diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c b/drivers/staging/rtl8723au/core/rtw_cmd.c index cb15ddaae12ea87e1698525dc6d0dbf43e90b244..068374a911fc940abb85e737fa0edc065d1e6eb3 100644 --- a/drivers/staging/rtl8723au/core/rtw_cmd.c +++ b/drivers/staging/rtl8723au/core/rtw_cmd.c @@ -1536,7 +1536,9 @@ static void c2h_wk_callback(struct work_struct *work) /* This C2H event is read, clear it */ c2h_evt_clear23a(adapter); } else if ((c2h_evt = (struct c2h_evt_hdr *) - kmalloc(16, GFP_ATOMIC))) { + kmalloc(16, GFP_KERNEL))) { + if (!c2h_evt) + continue; /* This C2H event is not read, read & clear now */ if (c2h_evt_read23a(adapter, (u8*)c2h_evt) != _SUCCESS) continue;