net: rtl88xx: fix to check null adapter 05/251305/1
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 12 Jan 2021 09:19:36 +0000 (18:19 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 12 Jan 2021 09:23:51 +0000 (18:23 +0900)
commit52ddac0afb8337c550ce5068c1c9c5ff785f4ebc
tree800aad57ff8aa90a6c68b379aef6213f6f7f0266
parent6d76f09e685b1f6e29f668ea1a64d1f441cba4d2
net: rtl88xx: fix to check null adapter

UBSAN warns about null pointer accessin rtl88xx. Fix to check
null pointer for adapter to remove below warning:

   UBSAN: Undefined behaviour in drivers/net/wireless/rtl8812au/os_dep/osdep_service.c:1187:2
   member access within null pointer of type 'struct _adapter'
   [...]
   [<ffffff9009b8d8b0>] __ubsan_handle_type_mismatch+0x28/0x30
   [<ffffff900330d2e4>] rtw_init_timer+0xbc/0xf0 [88XXau]
   [<ffffff90033150c8>] devobj_init+0x90/0x100 [88XXau]
   [<ffffff900331932c>] rtw_usb_primary_adapter_init+0x64c/0x1558 [88XXau]
   [<ffffff9009f77a1c>] usb_probe_interface+0x16c/0x4c8
   [...]

Change-Id: I258df3b790d7b1be49a89706dca46a895c4461b8
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
drivers/net/wireless/rtl8812au/os_dep/osdep_service.c