aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid
diff options
context:
space:
mode:
authorMark Haverkamp <markh@osdl.org>2005-09-20 15:56:36 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-09-26 18:46:18 -0400
commit08efb7b6116927c8b6e0af5064448e3aa13300e6 (patch)
tree55d9a30b8fdd669e12866250000425bef6fc00e0 /drivers/scsi/aacraid
parent131256cf203d0df62014dda8453a70cb6af0d0bb (diff)
[SCSI] aacraid: error return checking
This patch adds some additional error return checking and error return value propagation during initialization. Also, the deprecation of pci_module_init with pci_register_driver along with the change in return values. Signed-off-by: Mark Haverkamp <markh@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aacraid')
-rw-r--r--drivers/scsi/aacraid/linit.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 31d96b965ee1..de8490a92831 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -748,7 +748,8 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
748 unique_id++; 748 unique_id++;
749 } 749 }
750 750
751 if (pci_enable_device(pdev)) 751 error = pci_enable_device(pdev);
752 if (error)
752 goto out; 753 goto out;
753 754
754 if (pci_set_dma_mask(pdev, 0xFFFFFFFFULL) || 755 if (pci_set_dma_mask(pdev, 0xFFFFFFFFULL) ||
@@ -800,7 +801,9 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
800 goto out_free_fibs; 801 goto out_free_fibs;
801 802
802 aac->maximum_num_channels = aac_drivers[index].channels; 803 aac->maximum_num_channels = aac_drivers[index].channels;
803 aac_get_adapter_info(aac); 804 error = aac_get_adapter_info(aac);
805 if (error < 0)
806 goto out_deinit;
804 807
805 /* 808 /*
806 * Lets override negotiations and drop the maximum SG limit to 34 809 * Lets override negotiations and drop the maximum SG limit to 34
@@ -928,8 +931,8 @@ static int __init aac_init(void)
928 printk(KERN_INFO "Adaptec %s driver (%s)\n", 931 printk(KERN_INFO "Adaptec %s driver (%s)\n",
929 AAC_DRIVERNAME, aac_driver_version); 932 AAC_DRIVERNAME, aac_driver_version);
930 933
931 error = pci_module_init(&aac_pci_driver); 934 error = pci_register_driver(&aac_pci_driver);
932 if (error) 935 if (error < 0)
933 return error; 936 return error;
934 937
935 aac_cfg_major = register_chrdev( 0, "aac", &aac_cfg_fops); 938 aac_cfg_major = register_chrdev( 0, "aac", &aac_cfg_fops);