wifi: avoid offset calculation on NULL pointer
authorMichael-CY Lee <michael-cy.lee@mediatek.com>
Wed, 22 Nov 2023 03:02:37 +0000 (11:02 +0800)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 24 Nov 2023 17:37:34 +0000 (18:37 +0100)
commitef5828805842204dd0259ecfc132b5916c8a77ae
tree445b1d9a3ab5a75468cb1f0a8ac2786118a44949
parent103317670e6bf2542309db28d52444a83d84ed28
wifi: avoid offset calculation on NULL pointer

ieee80211_he_6ghz_oper() can be passed a NULL pointer
and checks for that, but already did the calculation
to inside of it before. Move it after the check.

Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com>
Link: https://lore.kernel.org/r/20231122030237.31276-1-michael-cy.lee@mediatek.com
[rewrite commit message]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/linux/ieee80211.h