[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211130034007.779351-1-yangyingliang@huawei.com>
Date: Tue, 30 Nov 2021 11:40:07 +0800
From: Yang Yingliang <yangyingliang@...wei.com>
To: <linux-kernel@...r.kernel.org>, <linux-staging@...ts.linux.dev>
CC: <gregkh@...uxfoundation.org>
Subject: [PATCH -next] staging: rtl8192e: rtllib_module: fix missing free_netdev() on error in alloc_rtllib()
Add the missing free_netdev() before return from alloc_rtllib()
in the error handling case.
Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
---
drivers/staging/rtl8192e/rtllib_module.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8192e/rtllib_module.c b/drivers/staging/rtl8192e/rtllib_module.c
index 64d9feee1f39..18d898714c5c 100644
--- a/drivers/staging/rtl8192e/rtllib_module.c
+++ b/drivers/staging/rtl8192e/rtllib_module.c
@@ -125,7 +125,7 @@ struct net_device *alloc_rtllib(int sizeof_priv)
ieee->pHTInfo = kzalloc(sizeof(struct rt_hi_throughput), GFP_KERNEL);
if (!ieee->pHTInfo)
- return NULL;
+ goto failed;
HTUpdateDefaultSetting(ieee);
HTInitializeHTInfo(ieee);
--
2.25.1
Powered by blists - more mailing lists