]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/block/cciss.c
seq_file: constify seq_operations
[net-next-2.6.git] / drivers / block / cciss.c
index a52cc7fe45ea12d4e3d7742615ed9904013e0f10..24c3e21ab263a6a685356f7d17ac5c0c097e60b6 100644 (file)
@@ -205,7 +205,7 @@ static int cciss_compat_ioctl(struct block_device *, fmode_t,
                              unsigned, unsigned long);
 #endif
 
-static struct block_device_operations cciss_fops = {
+static const struct block_device_operations cciss_fops = {
        .owner = THIS_MODULE,
        .open = cciss_open,
        .release = cciss_release,
@@ -363,7 +363,7 @@ static void cciss_seq_stop(struct seq_file *seq, void *v)
        h->busy_configuring = 0;
 }
 
-static struct seq_operations cciss_seq_ops = {
+static const struct seq_operations cciss_seq_ops = {
        .start = cciss_seq_start,
        .show  = cciss_seq_show,
        .next  = cciss_seq_next,
@@ -572,7 +572,7 @@ static struct attribute_group cciss_dev_attr_group = {
        .attrs = cciss_dev_attrs,
 };
 
-static struct attribute_group *cciss_dev_attr_groups[] = {
+static const struct attribute_group *cciss_dev_attr_groups[] = {
        &cciss_dev_attr_group,
        NULL
 };
@@ -3889,7 +3889,7 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
        int j = 0;
        int rc;
        int dac, return_code;
-       InquiryData_struct *inq_buff = NULL;
+       InquiryData_struct *inq_buff;
 
        if (reset_devices) {
                /* Reset the controller with a PCI power-cycle */
@@ -4029,6 +4029,7 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
                printk(KERN_WARNING "cciss: unable to determine firmware"
                        " version of controller\n");
        }
+       kfree(inq_buff);
 
        cciss_procinit(i);
 
@@ -4045,7 +4046,6 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
        return 1;
 
 clean4:
-       kfree(inq_buff);
        kfree(hba[i]->cmd_pool_bits);
        if (hba[i]->cmd_pool)
                pci_free_consistent(hba[i]->pdev,