staging: rtl8192u: null check the kzalloc
authorNavid Emamdoost <navid.emamdoost@gmail.com>
Wed, 31 Jul 2019 14:19:21 +0000 (09:19 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Aug 2019 16:38:08 +0000 (18:38 +0200)
commit09acf29c8246a20c6e255969df7e1131317181da
tree74233e9d82dfa20301088b73699fb2b6d333cd4b
parent572d8be0d4dd2251396dca38d176354180be7683
staging: rtl8192u: null check the kzalloc

In rtl8192_init_priv_variable allocation for priv->pFirmware may fail,
so a null check is necessary.priv->pFirmware is accessed later in
rtl8192_adapter_start. I added the check and made appropriate changes
to propagate the errno to the caller.

Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Link: https://lore.kernel.org/r/20190731141925.29268-1-navid.emamdoost@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/r8192U_core.c