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:
Chaehyun Lim 2015-09-08 00:36:36 +09:00 committed by Greg Kroah-Hartman
parent d9998a91fe
commit ac61ef86f9
1 changed files with 2 additions and 0 deletions

View File

@ -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;