[PATCH] staging: vt6656: use free_netdev instead of kfree

74 views
Skip to first unread message

Hema Prathaban

unread,
May 11, 2013, 1:09:47 PM5/11/13
to opw-k...@googlegroups.com, gre...@linuxfoundation.org
use free_netdev() instead of kfree(pDevice->apdev)

Signed-off-by: Hema Prathaban <hema...@gmail.com>
---
drivers/staging/vt6656/hostap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/vt6656/hostap.c b/drivers/staging/vt6656/hostap.c
index f4f1bf7..c699a30 100644
--- a/drivers/staging/vt6656/hostap.c
+++ b/drivers/staging/vt6656/hostap.c
@@ -133,7 +133,7 @@ static int hostap_disable_hostapd(struct vnt_private *pDevice, int rtnl_locked)
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Netdevice %s unregistered\n",
pDevice->dev->name, pDevice->apdev->name);
}
- kfree(pDevice->apdev);
+ free_netdev(pDevice->apdev);
pDevice->apdev = NULL;
pDevice->bEnable8021x = false;
pDevice->bEnableHostWEP = false;
--
1.7.10.4

Greg KH

unread,
May 11, 2013, 4:28:53 PM5/11/13
to Hema Prathaban, opw-k...@googlegroups.com
On Sat, May 11, 2013 at 10:39:47PM +0530, Hema Prathaban wrote:
> use free_netdev() instead of kfree(pDevice->apdev)
>
> Signed-off-by: Hema Prathaban <hema...@gmail.com>
> ---
> drivers/staging/vt6656/hostap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/vt6656/hostap.c b/drivers/staging/vt6656/hostap.c
> index f4f1bf7..c699a30 100644
> --- a/drivers/staging/vt6656/hostap.c
> +++ b/drivers/staging/vt6656/hostap.c
> @@ -133,7 +133,7 @@ static int hostap_disable_hostapd(struct vnt_private *pDevice, int rtnl_locked)
> DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Netdevice %s unregistered\n",
> pDevice->dev->name, pDevice->apdev->name);
> }
> - kfree(pDevice->apdev);
> + free_netdev(pDevice->apdev);

Nice job, this isn't a "cleanup" patch at all, it fixes a real bug.
I'll queue this up after 3.10-rc1 is out and backport it to the stable
kernel releases, unless you object.

thanks,

greg k-h

Hema .p

unread,
May 12, 2013, 1:09:31 PM5/12/13
to Greg KH, opw-k...@googlegroups.com
Thanks Greg.It is my pleasure Greg you can apply my patches anytime


thanks,

Hema
Reply all
Reply to author
Forward
0 new messages