diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-04 21:57:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-04 21:57:35 -0400 |
commit | 97d41e90fe61399b99d74820cb7f2d6e0fbac91d (patch) | |
tree | f759371424a26963b04badbb4433e360be4e8750 /drivers/scsi/aic94xx/aic94xx_init.c | |
parent | 3bdc9d0b408e01c4e556daba0035ba37f603e920 (diff) | |
parent | afaf5a2d341d33b66b47c2716a263ce593460a08 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (54 commits)
[SCSI] Initial Commit of qla4xxx
[SCSI] raid class: handle component-add errors
[SCSI] SCSI megaraid_sas: handle thrown errors
[SCSI] SCSI aic94xx: handle sysfs errors
[SCSI] SCSI st: fix error handling in module init, sysfs
[SCSI] SCSI sd: fix module init/exit error handling
[SCSI] SCSI osst: add error handling to module init, sysfs
[SCSI] scsi: remove hosts.h
[SCSI] scsi: Scsi_Cmnd convertion in aic7xxx_old.c
[SCSI] megaraid_sas: sets ioctl timeout and updates version,changelog
[SCSI] megaraid_sas: adds tasklet for cmd completion
[SCSI] megaraid_sas: prints pending cmds before setting hw_crit_error
[SCSI] megaraid_sas: function pointer for disable interrupt
[SCSI] megaraid_sas: frame count optimization
[SCSI] megaraid_sas: FW transition and q size changes
[SCSI] qla2xxx: Update version number to 8.01.07-k2.
[SCSI] qla2xxx: Stall mid-layer error handlers while rport is blocked.
[SCSI] qla2xxx: Add MODULE_FIRMWARE tags.
[SCSI] qla2xxx: Add support for host port state FC transport attribute.
[SCSI] qla2xxx: Add support for fabric name FC transport attribute.
...
Diffstat (limited to 'drivers/scsi/aic94xx/aic94xx_init.c')
-rw-r--r-- | drivers/scsi/aic94xx/aic94xx_init.c | 41 |
1 files changed, 33 insertions, 8 deletions
diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c index 734adc9d5206..99743ca29ca1 100644 --- a/drivers/scsi/aic94xx/aic94xx_init.c +++ b/drivers/scsi/aic94xx/aic94xx_init.c | |||
@@ -309,11 +309,29 @@ static ssize_t asd_show_dev_pcba_sn(struct device *dev, | |||
309 | } | 309 | } |
310 | static DEVICE_ATTR(pcba_sn, S_IRUGO, asd_show_dev_pcba_sn, NULL); | 310 | static DEVICE_ATTR(pcba_sn, S_IRUGO, asd_show_dev_pcba_sn, NULL); |
311 | 311 | ||
312 | static void asd_create_dev_attrs(struct asd_ha_struct *asd_ha) | 312 | static int asd_create_dev_attrs(struct asd_ha_struct *asd_ha) |
313 | { | 313 | { |
314 | device_create_file(&asd_ha->pcidev->dev, &dev_attr_revision); | 314 | int err; |
315 | device_create_file(&asd_ha->pcidev->dev, &dev_attr_bios_build); | 315 | |
316 | device_create_file(&asd_ha->pcidev->dev, &dev_attr_pcba_sn); | 316 | err = device_create_file(&asd_ha->pcidev->dev, &dev_attr_revision); |
317 | if (err) | ||
318 | return err; | ||
319 | |||
320 | err = device_create_file(&asd_ha->pcidev->dev, &dev_attr_bios_build); | ||
321 | if (err) | ||
322 | goto err_rev; | ||
323 | |||
324 | err = device_create_file(&asd_ha->pcidev->dev, &dev_attr_pcba_sn); | ||
325 | if (err) | ||
326 | goto err_biosb; | ||
327 | |||
328 | return 0; | ||
329 | |||
330 | err_biosb: | ||
331 | device_remove_file(&asd_ha->pcidev->dev, &dev_attr_bios_build); | ||
332 | err_rev: | ||
333 | device_remove_file(&asd_ha->pcidev->dev, &dev_attr_revision); | ||
334 | return err; | ||
317 | } | 335 | } |
318 | 336 | ||
319 | static void asd_remove_dev_attrs(struct asd_ha_struct *asd_ha) | 337 | static void asd_remove_dev_attrs(struct asd_ha_struct *asd_ha) |
@@ -645,7 +663,9 @@ static int __devinit asd_pci_probe(struct pci_dev *dev, | |||
645 | } | 663 | } |
646 | ASD_DPRINTK("escbs posted\n"); | 664 | ASD_DPRINTK("escbs posted\n"); |
647 | 665 | ||
648 | asd_create_dev_attrs(asd_ha); | 666 | err = asd_create_dev_attrs(asd_ha); |
667 | if (err) | ||
668 | goto Err_dev_attrs; | ||
649 | 669 | ||
650 | err = asd_register_sas_ha(asd_ha); | 670 | err = asd_register_sas_ha(asd_ha); |
651 | if (err) | 671 | if (err) |
@@ -668,6 +688,7 @@ Err_en_phys: | |||
668 | asd_unregister_sas_ha(asd_ha); | 688 | asd_unregister_sas_ha(asd_ha); |
669 | Err_reg_sas: | 689 | Err_reg_sas: |
670 | asd_remove_dev_attrs(asd_ha); | 690 | asd_remove_dev_attrs(asd_ha); |
691 | Err_dev_attrs: | ||
671 | Err_escbs: | 692 | Err_escbs: |
672 | asd_disable_ints(asd_ha); | 693 | asd_disable_ints(asd_ha); |
673 | free_irq(dev->irq, asd_ha); | 694 | free_irq(dev->irq, asd_ha); |
@@ -754,9 +775,9 @@ static ssize_t asd_version_show(struct device_driver *driver, char *buf) | |||
754 | } | 775 | } |
755 | static DRIVER_ATTR(version, S_IRUGO, asd_version_show, NULL); | 776 | static DRIVER_ATTR(version, S_IRUGO, asd_version_show, NULL); |
756 | 777 | ||
757 | static void asd_create_driver_attrs(struct device_driver *driver) | 778 | static int asd_create_driver_attrs(struct device_driver *driver) |
758 | { | 779 | { |
759 | driver_create_file(driver, &driver_attr_version); | 780 | return driver_create_file(driver, &driver_attr_version); |
760 | } | 781 | } |
761 | 782 | ||
762 | static void asd_remove_driver_attrs(struct device_driver *driver) | 783 | static void asd_remove_driver_attrs(struct device_driver *driver) |
@@ -834,10 +855,14 @@ static int __init aic94xx_init(void) | |||
834 | if (err) | 855 | if (err) |
835 | goto out_release_transport; | 856 | goto out_release_transport; |
836 | 857 | ||
837 | asd_create_driver_attrs(&aic94xx_pci_driver.driver); | 858 | err = asd_create_driver_attrs(&aic94xx_pci_driver.driver); |
859 | if (err) | ||
860 | goto out_unregister_pcidrv; | ||
838 | 861 | ||
839 | return err; | 862 | return err; |
840 | 863 | ||
864 | out_unregister_pcidrv: | ||
865 | pci_unregister_driver(&aic94xx_pci_driver); | ||
841 | out_release_transport: | 866 | out_release_transport: |
842 | sas_release_transport(aic94xx_transport_template); | 867 | sas_release_transport(aic94xx_transport_template); |
843 | out_destroy_caches: | 868 | out_destroy_caches: |