mt76: do not use devm API for led classdev
authorFelix Fietkau <nbd@nbd.name>
Sun, 29 Sep 2019 20:04:37 +0000 (22:04 +0200)
committerFelix Fietkau <nbd@nbd.name>
Wed, 20 Nov 2019 12:23:49 +0000 (13:23 +0100)
commit36f7e2b2bb1de86f0072cd49ca93d82b9e8fd894
treeaf6a83ee9272c5b0d421d09bd75f0d805ed0ea4a
parent55857ab857975080d9e400ca85a7c192f7986ab9
mt76: do not use devm API for led classdev

With the devm API, the unregister happens after the device cleanup is done,
after which the struct mt76_dev which contains the led_cdev has already been
freed. This leads to a use-after-free bug that can crash the system.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mac80211.c