mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
staging: wilc1000: linux_wlan.c: add kzalloc error check
This patch adds error check if kzalloc is failed. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d9998a91fe
commit
ac61ef86f9
@@ -2251,6 +2251,8 @@ int wilc_netdev_init(void)
|
||||
|
||||
/*create the common structure*/
|
||||
g_linux_wlan = kzalloc(sizeof(linux_wlan_t), GFP_KERNEL);
|
||||
if (!g_linux_wlan)
|
||||
return -ENOMEM;
|
||||
|
||||
/*Reset interrupt count debug*/
|
||||
int_rcvdU = 0;
|
||||
|
||||
Reference in New Issue
Block a user