Commit 1604296d authored by Chaehyun Lim's avatar Chaehyun Lim Committed by Greg Kroah-Hartman

staging: wilc1000: host_int_init: fix kzalloc error check

This patch fixes error check when kzalloc is failed.
NULL comparison style is changed to use ! operator and
PRINT_ER is also removed.
Signed-off-by: default avatarChaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 27a82ebf
......@@ -6374,9 +6374,8 @@ s32 host_int_init(tstrWILC_WFIDrv **phWFIDrv)
/*Allocate host interface private structure*/
pstrWFIDrv = kzalloc(sizeof(tstrWILC_WFIDrv), GFP_KERNEL);
if (pstrWFIDrv == NULL) {
if (!pstrWFIDrv) {
s32Error = -ENOMEM;
PRINT_ER("Failed to allocate memory\n");
goto _fail_timer_2;
}
*phWFIDrv = pstrWFIDrv;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment