]> www.infradead.org Git - users/jedix/linux-maple.git/commit
wifi: mt76: mt7996: Add NULL check in mt7996_thermal_init
authorCharles Han <hanchunchao@inspur.com>
Mon, 7 Apr 2025 09:55:51 +0000 (17:55 +0800)
committerFelix Fietkau <nbd@nbd.name>
Wed, 21 May 2025 12:49:38 +0000 (14:49 +0200)
commitcaf4b347c5dc40fdd125793b5e82ba9fc4de5275
tree740aa036c49d87bf8de9334ab7a47b8b6170f756
parentcadebdad959bf25edd544da6dd1a9750e876deb6
wifi: mt76: mt7996: Add NULL check in mt7996_thermal_init

devm_kasprintf() can return a NULL pointer on failure,but this
returned value in mt7996_thermal_init() is not checked.
Add NULL check in mt7996_thermal_init(), to handle kernel NULL
pointer dereference error.

Fixes: 69d54ce7491d ("wifi: mt76: mt7996: switch to single multi-radio wiphy")
Signed-off-by: Charles Han <hanchunchao@inspur.com>
Link: https://patch.msgid.link/20250407095551.32127-1-hanchunchao@inspur.com
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7996/init.c