]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/tpm/tpm_bios.c
tpm_bios.c: make 2 structs static
[linux-2.6-omap-h63xx.git] / drivers / char / tpm / tpm_bios.c
index 4eba32b23b297c2f15bd942292c754bcc4d7708b..68f052b42ed7807e9771761a171778bcd6fc3f1e 100644 (file)
@@ -7,6 +7,8 @@
  *     Reiner Sailer <sailer@watson.ibm.com>
  *     Kylene Hall <kjhall@us.ibm.com>
  *
+ * Maintained by: <tpmdd-devel@lists.sourceforge.net>
+ *
  * Access to the eventlog extended by the TCG BIOS of PC platform
  *
  * This program is free software; you can redistribute it and/or
@@ -427,7 +429,7 @@ static int tpm_ascii_bios_measurements_open(struct inode *inode,
                return -ENOMEM;
 
        if ((err = read_log(log)))
-               return err;
+               goto out_free;
 
        /* now register seq file */
        err = seq_open(file, &tpm_ascii_b_measurments_seqops);
@@ -435,13 +437,18 @@ static int tpm_ascii_bios_measurements_open(struct inode *inode,
                seq = file->private_data;
                seq->private = log;
        } else {
-               kfree(log->bios_event_log);
-               kfree(log);
+               goto out_free;
        }
+
+out:
        return err;
+out_free:
+       kfree(log->bios_event_log);
+       kfree(log);
+       goto out;
 }
 
-const struct file_operations tpm_ascii_bios_measurements_ops = {
+static const struct file_operations tpm_ascii_bios_measurements_ops = {
        .open = tpm_ascii_bios_measurements_open,
        .read = seq_read,
        .llseek = seq_lseek,
@@ -460,7 +467,7 @@ static int tpm_binary_bios_measurements_open(struct inode *inode,
                return -ENOMEM;
 
        if ((err = read_log(log)))
-               return err;
+               goto out_free;
 
        /* now register seq file */
        err = seq_open(file, &tpm_binary_b_measurments_seqops);
@@ -468,13 +475,18 @@ static int tpm_binary_bios_measurements_open(struct inode *inode,
                seq = file->private_data;
                seq->private = log;
        } else {
-               kfree(log->bios_event_log);
-               kfree(log);
+               goto out_free;
        }
+
+out:
        return err;
+out_free:
+       kfree(log->bios_event_log);
+       kfree(log);
+       goto out;
 }
 
-const struct file_operations tpm_binary_bios_measurements_ops = {
+static const struct file_operations tpm_binary_bios_measurements_ops = {
        .open = tpm_binary_bios_measurements_open,
        .read = seq_read,
        .llseek = seq_lseek,