]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: mt76: mt7615: check devm_kasprintf() returned value
authorMa Ke <make24@iscas.ac.cn>
Thu, 5 Sep 2024 01:47:53 +0000 (09:47 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:11:14 +0000 (15:11 +0200)
commitf5056adc042f6e67cb8d88092c4c3a3ec9a63b03
treefbd2297c12c37f8d073b8194e257d6668c0d6820
parent44f94356e6a4aaa03805b6590b81507ac87dcf3a
wifi: mt76: mt7615: check devm_kasprintf() returned value

commit 5acdc432f832d810e0d638164c393b877291d9b4 upstream.

devm_kasprintf() can return a NULL pointer on failure but this returned
value is not checked. Fix this lack and check the returned value.

Found by code review.

Cc: stable@vger.kernel.org
Fixes: 0bb4e9187ea4 ("mt76: mt7615: fix hwmon temp sensor mem use-after-free")
Signed-off-by: Ma Ke <make24@iscas.ac.cn>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Link: https://patch.msgid.link/20240905014753.353271-1-make24@iscas.ac.cn
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/mediatek/mt76/mt7615/init.c