]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/isdn/hisax/st5481_init.c
HiSax: fix error checking for hisax_register()]
[linux-2.6-omap-h63xx.git] / drivers / isdn / hisax / st5481_init.c
index bb3a28a53ff4de2536b06095a54f2516832cef25..13751237bfcde6d861122cc84ca6c18605ea8dee 100644 (file)
@@ -107,12 +107,17 @@ static int probe_st5481(struct usb_interface *intf,
        for (i = 0; i < 2; i++)
                b_if[i] = &adapter->bcs[i].b_if;
 
-       hisax_register(&adapter->hisax_d_if, b_if, "st5481_usb", protocol);
+       if (hisax_register(&adapter->hisax_d_if, b_if, "st5481_usb",
+                       protocol) != 0)
+               goto err_b1;
+
        st5481_start(adapter);
 
        usb_set_intfdata(intf, adapter);
        return 0;
 
+ err_b1:
+       st5481_release_b(&adapter->bcs[1]);
  err_b:
        st5481_release_b(&adapter->bcs[0]);
  err_d: