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 <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
/*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;