staging: r8188eu: convert type of HalData in struct adapter
authorMichael Straube <straube.linux@gmail.com>
Tue, 7 Dec 2021 14:04:05 +0000 (15:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Dec 2021 07:56:35 +0000 (08:56 +0100)
commitd904512db6f372759ecd1c8f92e689e63af2f03a
treeaad385ada536814716babe29f9218d25405bbf4f
parentb07f55053557946d77d33ff6bc854058bb10621c
staging: r8188eu: convert type of HalData in struct adapter

adapter->HalData is used in the GET_HAL_DATA macro all across the
driver code but nobody checks if its allocation in
rtl188eu_alloc_haldata() was successful or not.

To avoid errors when the allocation fails convert the type of field
HalData from void pointer to struct hal_data_8188eu. Remove
GET_HAL_DATA, rtl8188eu_alloc_haldata(), rtl8188e_free_hal_data().

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211207140405.8673-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16 files changed:
drivers/staging/r8188eu/hal/HalPhyRf_8188e.c
drivers/staging/r8188eu/hal/odm.c
drivers/staging/r8188eu/hal/rtl8188e_cmd.c
drivers/staging/r8188eu/hal/rtl8188e_dm.c
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
drivers/staging/r8188eu/hal/rtl8188e_phycfg.c
drivers/staging/r8188eu/hal/rtl8188e_rf6052.c
drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c
drivers/staging/r8188eu/hal/rtl8188eu_xmit.c
drivers/staging/r8188eu/hal/usb_halinit.c
drivers/staging/r8188eu/hal/usb_ops_linux.c
drivers/staging/r8188eu/include/drv_types.h
drivers/staging/r8188eu/include/hal_intf.h
drivers/staging/r8188eu/include/rtl8188e_hal.h
drivers/staging/r8188eu/os_dep/os_intfs.c
drivers/staging/r8188eu/os_dep/usb_intf.c