From: Dan Williams Date: Fri, 25 May 2007 17:36:57 +0000 (-0400) Subject: [PATCH] libertas: don't tear down netdev in libertas_activate_card X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1db733eff6319cdf4199fc7d3a3554fef1361f1a;p=linux-beck.git [PATCH] libertas: don't tear down netdev in libertas_activate_card libertas_activate_card() doesn't create the netdev, and shouldn't free it on error. The caller of libertas_activate_card() is responsible for cleaning up errors from libertas_add_card(), not libertas_activate_card(). Signed-off-by: Dan Williams Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index b05a6f99a1b2..5fde636d1863 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c @@ -878,8 +878,6 @@ err_registerdev: /* Stop the thread servicing the interrupts */ wake_up_interruptible(&priv->mainthread.waitq); wlan_terminate_thread(&priv->mainthread); - kfree(priv->adapter); - free_netdev(dev); done: lbs_deb_leave_args(LBS_DEB_NET, "ret %d", ret); return ret;