staging: rtl8712: check for alloc fail in _r8712_init_recv_priv()
authorNam Cao <namcaov@gmail.com>
Tue, 25 Oct 2022 09:12:24 +0000 (11:12 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 31 Oct 2022 08:08:30 +0000 (09:08 +0100)
commit63b5e50571ce4d87cd6c1c4d99de74c9d86fd0d8
treeb454b585db06f9f752b273dd6f24a7d3a08263c5
parentc5a7eecdcdb6c9d3a907ee66db2b5cffc8bdb4e1
staging: rtl8712: check for alloc fail in _r8712_init_recv_priv()

The function _r8712_init_recv_priv() and also r8712_init_recv_priv()
just returns silently if they fail to allocate memory. Change their
return type to int and add necessary checks and handling if they return
-ENOMEM

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Nam Cao <namcaov@gmail.com>
Link: https://lore.kernel.org/r/506ac35a667e511db568b06b86834fd0ceeba453.1666688642.git.namcaov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/os_intfs.c
drivers/staging/rtl8712/recv_osdep.h
drivers/staging/rtl8712/rtl8712_recv.c
drivers/staging/rtl8712/rtl871x_recv.c