]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/block/cciss.c
Merge branch 'for-linus' of git://brick.kernel.dk/data/git/linux-2.6-block
[linux-2.6-omap-h63xx.git] / drivers / block / cciss.c
index 2ee4a44423df162fb3104775681f548ac1f12d69..d719a5d8f4355e45905410f4a1c0b506702d5bb4 100644 (file)
@@ -1039,7 +1039,7 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
                                status = -ENOMEM;
                                goto cleanup1;
                        }
-                       buff_size = (int *)kmalloc(MAXSGENTRIES * sizeof(int),
+                       buff_size = kmalloc(MAXSGENTRIES * sizeof(int),
                                                   GFP_KERNEL);
                        if (!buff_size) {
                                status = -ENOMEM;
@@ -3004,10 +3004,13 @@ static int cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev)
        }
        return 0;
 
-      err_out_free_res:
+err_out_free_res:
+       /*
+        * Deliberately omit pci_disable_device(): it does something nasty to
+        * Smart Array controllers that pci_enable_device does not undo
+        */
        pci_release_regions(pdev);
        return err;
-
 }
 
 /*
@@ -3380,6 +3383,10 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
                if (drv->queue)
                        blk_cleanup_queue(drv->queue);
        }
+       /*
+        * Deliberately omit pci_disable_device(): it does something nasty to
+        * Smart Array controllers that pci_enable_device does not undo
+        */
        pci_release_regions(pdev);
        pci_set_drvdata(pdev, NULL);
        free_hba(i);
@@ -3449,6 +3456,10 @@ static void __devexit cciss_remove_one(struct pci_dev *pdev)
 #ifdef CONFIG_CISS_SCSI_TAPE
        kfree(hba[i]->scsi_rejects.complete);
 #endif
+       /*
+        * Deliberately omit pci_disable_device(): it does something nasty to
+        * Smart Array controllers that pci_enable_device does not undo
+        */
        pci_release_regions(pdev);
        pci_set_drvdata(pdev, NULL);
        free_hba(i);