aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pcmcia/sym53c500_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/pcmcia/sym53c500_cs.c')
-rw-r--r--drivers/scsi/pcmcia/sym53c500_cs.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/scsi/pcmcia/sym53c500_cs.c b/drivers/scsi/pcmcia/sym53c500_cs.c
index 49a37de68758..b4432206a881 100644
--- a/drivers/scsi/pcmcia/sym53c500_cs.c
+++ b/drivers/scsi/pcmcia/sym53c500_cs.c
@@ -707,7 +707,7 @@ static struct scsi_host_template sym53c500_driver_template = {
707#define CS_CHECK(fn, ret) \ 707#define CS_CHECK(fn, ret) \
708do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) 708do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
709 709
710static void 710static int
711SYM53C500_config(struct pcmcia_device *link) 711SYM53C500_config(struct pcmcia_device *link)
712{ 712{
713 struct scsi_info_t *info = link->priv; 713 struct scsi_info_t *info = link->priv;
@@ -836,7 +836,8 @@ next_entry:
836 836
837 scsi_scan_host(host); 837 scsi_scan_host(host);
838 838
839 goto out; /* SUCCESS */ 839 link->state &= ~DEV_CONFIG_PENDING;
840 return 0;
840 841
841err_free_irq: 842err_free_irq:
842 free_irq(irq_level, host); 843 free_irq(irq_level, host);
@@ -845,15 +846,13 @@ err_free_scsi:
845err_release: 846err_release:
846 release_region(port_base, 0x10); 847 release_region(port_base, 0x10);
847 printk(KERN_INFO "sym53c500_cs: no SCSI devices found\n"); 848 printk(KERN_INFO "sym53c500_cs: no SCSI devices found\n");
848
849out:
850 link->state &= ~DEV_CONFIG_PENDING; 849 link->state &= ~DEV_CONFIG_PENDING;
851 return; 850 return -ENODEV;
852 851
853cs_failed: 852cs_failed:
854 cs_error(link, last_fn, last_ret); 853 cs_error(link, last_fn, last_ret);
855 SYM53C500_release(link); 854 SYM53C500_release(link);
856 return; 855 return -ENODEV;
857} /* SYM53C500_config */ 856} /* SYM53C500_config */
858 857
859static int sym53c500_resume(struct pcmcia_device *link) 858static int sym53c500_resume(struct pcmcia_device *link)
@@ -892,7 +891,7 @@ SYM53C500_detach(struct pcmcia_device *link)
892} /* SYM53C500_detach */ 891} /* SYM53C500_detach */
893 892
894static int 893static int
895SYM53C500_attach(struct pcmcia_device *link) 894SYM53C500_probe(struct pcmcia_device *link)
896{ 895{
897 struct scsi_info_t *info; 896 struct scsi_info_t *info;
898 897
@@ -915,9 +914,7 @@ SYM53C500_attach(struct pcmcia_device *link)
915 link->conf.Present = PRESENT_OPTION; 914 link->conf.Present = PRESENT_OPTION;
916 915
917 link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; 916 link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
918 SYM53C500_config(link); 917 return SYM53C500_config(link);
919
920 return 0;
921} /* SYM53C500_attach */ 918} /* SYM53C500_attach */
922 919
923MODULE_AUTHOR("Bob Tracy <rct@frus.com>"); 920MODULE_AUTHOR("Bob Tracy <rct@frus.com>");
@@ -937,7 +934,7 @@ static struct pcmcia_driver sym53c500_cs_driver = {
937 .drv = { 934 .drv = {
938 .name = "sym53c500_cs", 935 .name = "sym53c500_cs",
939 }, 936 },
940 .probe = SYM53C500_attach, 937 .probe = SYM53C500_probe,
941 .remove = SYM53C500_detach, 938 .remove = SYM53C500_detach,
942 .id_table = sym53c500_ids, 939 .id_table = sym53c500_ids,
943 .resume = sym53c500_resume, 940 .resume = sym53c500_resume,