]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Missed checks in hisax.
authorDave Jones <davej@codemonkey.org.uk>
Wed, 8 Jan 2003 10:54:37 +0000 (02:54 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Wed, 8 Jan 2003 10:54:37 +0000 (02:54 -0800)
From 2.4

drivers/isdn/hisax/config.c

index 716ca6b389a6b6aac680b675f7c8ea17537072e7..bebf09e718e5e1d87795de5d7765b9968d5e6d4b 100644 (file)
@@ -1511,7 +1511,8 @@ static int __init HiSax_init(void)
               nrcards, (nrcards > 1) ? "s" : "");
 
        /* Install only, if at least one card found */
-       HiSax_inithardware(NULL);
+       if (!HiSax_inithardware(NULL))
+               return -ENODEV;
        return 0;
 
  out_tei:
@@ -1575,7 +1576,8 @@ int elsa_init_pcmcia(void *pcm_iob, int pcm_irq, int *busy_flag, int prot)
        printk(KERN_DEBUG "HiSax: Total %d card%s defined\n",
               nrcards, (nrcards > 1) ? "s" : "");
 
-       HiSax_inithardware(busy_flag);
+       if (!HiSax_inithardware(busy_flag))
+               return -ENODEV;
        printk(KERN_NOTICE "HiSax: module installed\n");
 #endif
        return 0;
@@ -1617,7 +1619,8 @@ int hfc_init_pcmcia(void *pcm_iob, int pcm_irq, int *busy_flag, int prot)
        printk(KERN_DEBUG "HiSax: Total %d card%s defined\n",
               nrcards, (nrcards > 1) ? "s" : "");
 
-       HiSax_inithardware(busy_flag);
+       if (!HiSax_inithardware(busy_flag))
+               return -ENODEV;
        printk(KERN_NOTICE "HiSax: module installed\n");
 #endif
        return 0;
@@ -1659,7 +1662,8 @@ int sedl_init_pcmcia(void *pcm_iob, int pcm_irq, int *busy_flag, int prot)
        printk(KERN_DEBUG "HiSax: Total %d card%s defined\n",
               nrcards, (nrcards > 1) ? "s" : "");
 
-       HiSax_inithardware(busy_flag);
+       if (!HiSax_inithardware(busy_flag))
+               return -ENODEV;
        printk(KERN_NOTICE "HiSax: module installed\n");
 #endif
        return 0;
@@ -1701,7 +1705,8 @@ int avm_a1_init_pcmcia(void *pcm_iob, int pcm_irq, int *busy_flag, int prot)
        printk(KERN_DEBUG "HiSax: Total %d card%s defined\n",
               nrcards, (nrcards > 1) ? "s" : "");
 
-       HiSax_inithardware(busy_flag);
+       if (!HiSax_inithardware(busy_flag))
+               return -ENODEV;
        printk(KERN_NOTICE "HiSax: module installed\n");
 #endif
        return 0;