mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-14 04:26:45 +00:00
staging: rtl8723bs: hal: Add null check after memory allocation
Add NULL check post call to rtw_zmalloc. Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
247c2ad278
commit
7930f8e589
1 changed files with 3 additions and 0 deletions
|
@ -816,6 +816,9 @@ void clearinterrupt8723bsdio(struct adapter *adapter)
|
|||
haldata = GET_HAL_DATA(adapter);
|
||||
clear = rtw_zmalloc(4);
|
||||
|
||||
if (!clear)
|
||||
return;
|
||||
|
||||
/* Clear corresponding HISR Content if needed */
|
||||
*(__le32 *)clear = cpu_to_le32(haldata->sdio_hisr & MASK_SDIO_HISR_CLEAR);
|
||||
if (*(__le32 *)clear) {
|
||||
|
|
Loading…
Reference in a new issue