]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/isdn/hisax/hisax_fcpcipnp.c
HiSax: fix error checking for hisax_register()]
[linux-2.6-omap-h63xx.git] / drivers / isdn / hisax / hisax_fcpcipnp.c
index 9e088fce8c3afb8d032a30e715ff08d6fec89066..7993e01f9fc5cd08e22e0caac469e7208b2e3930 100644 (file)
@@ -859,7 +859,11 @@ new_adapter(void)
        for (i = 0; i < 2; i++)
                b_if[i] = &adapter->bcs[i].b_if;
 
-       hisax_register(&adapter->isac.hisax_d_if, b_if, "fcpcipnp", protocol);
+       if (hisax_register(&adapter->isac.hisax_d_if, b_if, "fcpcipnp",
+                       protocol) != 0) {
+               kfree(adapter);
+               adapter = NULL;
+       }
 
        return adapter;
 }