]> git.itanic.dy.fi Git - linux-stable/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Jan 2024 10:50:03 +0000 (11:50 +0100)
commit0c880e1e38ea90a32ed6d261dc952128cfe7561f
treec7c3a8cbf0ae896e990dd42c17355195820c3d56
parentdd9465b108805f4e34732f86499099441befbe5e
wifi: avoid offset calculation on NULL pointer

[ Upstream commit ef5828805842204dd0259ecfc132b5916c8a77ae ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/ieee80211.h