diff --git a/mac80211.c b/mac80211.c index 3be3d0be..bcba1fef 100644 --- a/mac80211.c +++ b/mac80211.c @@ -471,7 +471,8 @@ void mt76_unregister_device(struct mt76_dev *dev) { struct ieee80211_hw *hw = dev->hw; - mt76_led_cleanup(dev); + if (IS_ENABLED(CONFIG_MT76_LEDS)) + mt76_led_cleanup(dev); mt76_tx_status_check(dev, NULL, true); ieee80211_unregister_hw(hw); }