* [PATCH] staging: rtl8723bs: hal: Add null check after memory allocation
@ 2019-06-16 3:14 Hariprasad Kelam
0 siblings, 0 replies; only message in thread
From: Hariprasad Kelam @ 2019-06-16 3:14 UTC (permalink / raw)
To: Greg Kroah-Hartman, Hans de Goede, Arnd Bergmann, Colin Ian King,
Hariprasad Kelam, Payal Kshirsagar, Madhumitha Prabakaran,
Nishka Dasgupta, devel, linux-kernel
Add NULL check post call to rtw_zmalloc.
Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
---
drivers/staging/rtl8723bs/hal/sdio_ops.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c b/drivers/staging/rtl8723bs/hal/sdio_ops.c
index ac79de8..9177c18 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_ops.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c
@@ -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) {
--
2.7.4
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-06-16 3:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-16 3:14 [PATCH] staging: rtl8723bs: hal: Add null check after memory allocation Hariprasad Kelam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®