Skip to content
Commit 03ee8f73 authored by Henry Martin's avatar Henry Martin Committed by Felix Fietkau
Browse files

wifi: mt76: mt7925: Fix null-ptr-deref in mt7925_thermal_init()



devm_kasprintf() returns NULL on error. Currently, mt7925_thermal_init()
does not check for this case, which results in a NULL pointer
dereference.

Add NULL check after devm_kasprintf() to prevent this issue.

Fixes: 396e41a7 ("wifi: mt76: mt7925: support temperature sensor")
Signed-off-by: default avatarHenry Martin <bsdhenryma@tencent.com>
Reviewed-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patch.msgid.link/20250625124901.1839832-1-bsdhenryma@tencent.com


Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent dedf2ec3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment