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:
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;
|
||||
|
|
Loading…
Reference in New Issue