wifi: rtl8xxxu: check vif before using in rtl8xxxu_tx()
authorPing-Ke Shih <pkshih@realtek.com>
Fri, 16 Feb 2024 03:39:23 +0000 (11:39 +0800)
committerKalle Valo <kvalo@kernel.org>
Wed, 21 Feb 2024 18:55:23 +0000 (20:55 +0200)
commit513c559ca9f05394da79fbf20a8f89eec5f53dce
tree498de3c579d771c608bb52f22329956fff5425a3
parent8ca4cdef93297c9b9bf08da39bc940bd20acbb94
wifi: rtl8xxxu: check vif before using in rtl8xxxu_tx()

The 'vif' is from tx_info of SKB, and other codes check 'vif' before using,
which raises smatch warnings:

drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:5656 rtl8xxxu_tx()
   warn: variable dereferenced before check 'vif' (see line 5553)

Compile tested only.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240216033923.34683-1-pkshih@realtek.com
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c