[PATCH] libertas: correctly unregister mesh netdev on error
authorDan Williams <dcbw@redhat.com>
Fri, 25 May 2007 17:35:23 +0000 (13:35 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 11 Jun 2007 18:28:41 +0000 (14:28 -0400)
Subject says it all.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/if_usb.c

index 6433be63fb7f51108f9d896362032f2ae5b739bb..10698a1c1c30e19b5fad5b2529ee619defe6cac1 100644 (file)
@@ -231,8 +231,7 @@ static int if_usb_probe(struct usb_interface *intf,
        return 0;
 
 err_activate_card:
-       unregister_netdev(priv->mesh_dev);
-       free_netdev(priv->mesh_dev);
+       libertas_remove_mesh(priv);
 err_add_mesh:
        free_netdev(priv->dev);
        kfree(priv->adapter);