Commit 7930f8e5 authored by Hariprasad Kelam's avatar Hariprasad Kelam Committed by Greg Kroah-Hartman

staging: rtl8723bs: hal: Add null check after memory allocation

Add NULL check post call to rtw_zmalloc.
Signed-off-by: default avatarHariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 247c2ad2
...@@ -816,6 +816,9 @@ void clearinterrupt8723bsdio(struct adapter *adapter) ...@@ -816,6 +816,9 @@ void clearinterrupt8723bsdio(struct adapter *adapter)
haldata = GET_HAL_DATA(adapter); haldata = GET_HAL_DATA(adapter);
clear = rtw_zmalloc(4); clear = rtw_zmalloc(4);
if (!clear)
return;
/* Clear corresponding HISR Content if needed */ /* Clear corresponding HISR Content if needed */
*(__le32 *)clear = cpu_to_le32(haldata->sdio_hisr & MASK_SDIO_HISR_CLEAR); *(__le32 *)clear = cpu_to_le32(haldata->sdio_hisr & MASK_SDIO_HISR_CLEAR);
if (*(__le32 *)clear) { if (*(__le32 *)clear) {
......
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