]> git.baikalelectronics.ru Git - kernel.git/commit
staging: r8188eu: add a check for rtw_cbuf_alloc()
authorXiaoke Wang <xkernel.wang@foxmail.com>
Wed, 30 Mar 2022 11:30:05 +0000 (19:30 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Apr 2022 05:33:48 +0000 (07:33 +0200)
commitdac5d612d25141d5599b16bc44573fc8be1803c9
tree909cce304695697aa05f10e80a3c43d09e4d51e1
parented7daa30099734c2555c0540e4418a2d053ec6b9
staging: r8188eu: add a check for rtw_cbuf_alloc()

kmalloc() is called by rtw_cbuf_alloc() and it returns pointer of
srtuct rtw_cbuf, NULL for allocation failure. So it is better to check
the return value of it.

Signed-off-by: Xiaoke Wang <xkernel.wang@foxmail.com>
Link: https://lore.kernel.org/r/tencent_D95ACC78B93B1CDD14C4E13E4A66FF892008@qq.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_cmd.c