diff options
Diffstat (limited to 'drivers/scsi/aacraid/linit.c')
-rw-r--r-- | drivers/scsi/aacraid/linit.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 4ff29d7f5825..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) || |
@@ -772,6 +773,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev, | |||
772 | shost->irq = pdev->irq; | 773 | shost->irq = pdev->irq; |
773 | shost->base = pci_resource_start(pdev, 0); | 774 | shost->base = pci_resource_start(pdev, 0); |
774 | shost->unique_id = unique_id; | 775 | shost->unique_id = unique_id; |
776 | shost->max_cmd_len = 16; | ||
775 | 777 | ||
776 | aac = (struct aac_dev *)shost->hostdata; | 778 | aac = (struct aac_dev *)shost->hostdata; |
777 | aac->scsi_host_ptr = shost; | 779 | aac->scsi_host_ptr = shost; |
@@ -799,7 +801,9 @@ static int __devinit aac_probe_one(struct pci_dev *pdev, | |||
799 | goto out_free_fibs; | 801 | goto out_free_fibs; |
800 | 802 | ||
801 | aac->maximum_num_channels = aac_drivers[index].channels; | 803 | aac->maximum_num_channels = aac_drivers[index].channels; |
802 | aac_get_adapter_info(aac); | 804 | error = aac_get_adapter_info(aac); |
805 | if (error < 0) | ||
806 | goto out_deinit; | ||
803 | 807 | ||
804 | /* | 808 | /* |
805 | * Lets override negotiations and drop the maximum SG limit to 34 | 809 | * Lets override negotiations and drop the maximum SG limit to 34 |
@@ -927,8 +931,8 @@ static int __init aac_init(void) | |||
927 | printk(KERN_INFO "Adaptec %s driver (%s)\n", | 931 | printk(KERN_INFO "Adaptec %s driver (%s)\n", |
928 | AAC_DRIVERNAME, aac_driver_version); | 932 | AAC_DRIVERNAME, aac_driver_version); |
929 | 933 | ||
930 | error = pci_module_init(&aac_pci_driver); | 934 | error = pci_register_driver(&aac_pci_driver); |
931 | if (error) | 935 | if (error < 0) |
932 | return error; | 936 | return error; |
933 | 937 | ||
934 | aac_cfg_major = register_chrdev( 0, "aac", &aac_cfg_fops); | 938 | aac_cfg_major = register_chrdev( 0, "aac", &aac_cfg_fops); |