From 1604296d20a7d278f525a8134e2db1a727b2fdd1 Mon Sep 17 00:00:00 2001 From: Chaehyun Lim Date: Tue, 22 Sep 2015 18:34:56 +0900 Subject: [PATCH] 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: Chaehyun Lim Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wilc1000/host_interface.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 3f922169d6e9..6b744a2c1f96 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -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; -- 2.34.1