Subject says it all.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
goto dealloc;
if (wlan_add_mesh(priv))
- goto dealloc;
+ goto err_add_mesh;
if (libertas_activate_card(priv))
- goto dealloc;
+ goto err_activate_card;
if (libertas_found < MAX_DEVS) {
libertas_devs[libertas_found] = priv->wlan_dev.netdev;
*/
return 0;
+err_activate_card:
+ unregister_netdev(priv->mesh_dev);
+ free_netdev(priv->mesh_dev);
+err_add_mesh:
+ free_netdev(priv->wlan_dev.netdev);
+ kfree(priv->adapter);
dealloc:
if_usb_free(usb_cardp);
err_kzalloc:
free_netdev(dev);
+ priv = NULL;
done:
lbs_deb_leave_args(LBS_DEB_NET, "priv %p", priv);
return priv;