diff options
Diffstat (limited to 'target/linux/generic/files')
-rw-r--r-- | target/linux/generic/files/drivers/leds/ledtrig-netdev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/target/linux/generic/files/drivers/leds/ledtrig-netdev.c b/target/linux/generic/files/drivers/leds/ledtrig-netdev.c index 5d0f95499b..cfa4dc0758 100644 --- a/target/linux/generic/files/drivers/leds/ledtrig-netdev.c +++ b/target/linux/generic/files/drivers/leds/ledtrig-netdev.c @@ -269,11 +269,12 @@ static int netdev_trig_notify(struct notifier_block *nb, return NOTIFY_DONE; spin_lock_bh(&trigger_data->lock); - del_timer_sync(&trigger_data->timer); if (strcmp(dev->name, trigger_data->device_name)) goto done; + del_timer_sync(&trigger_data->timer); + if (evt == NETDEV_REGISTER || evt == NETDEV_CHANGENAME) { if (trigger_data->net_dev != NULL) dev_put(trigger_data->net_dev); |