Staging: rtl8723bs: Add missing NULL check for kmalloc

Include missing NULL check for kmalloc in function rtw_init_evt_priv.

Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Madhumitha Prabakaran 2019-03-18 18:12:36 -05:00 committed by Greg Kroah-Hartman
parent 4cdf1d0e1a
commit 59dbadcdab

View File

@ -210,6 +210,8 @@ int rtw_init_evt_priv(struct evt_priv *pevtpriv)
_init_workitem(&pevtpriv->c2h_wk, c2h_wk_callback, NULL);
pevtpriv->c2h_wk_alive = false;
pevtpriv->c2h_queue = rtw_cbuf_alloc(C2H_QUEUE_MAX_LEN+1);
if (!pevtpriv->c2h_queue)
return -ENOMEM;
return 0;
}