summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau2024-09-03 08:11:26 +0000
committerFelix Fietkau2024-09-03 10:02:02 +0000
commit595094f5c213fa301b0304c1e0732811740b4db6 (patch)
tree0b8a51bd61967f8eeb8b42197b6d4f808d6cf519
parentb7b294266781089242e24ee449539f0635e9f7c3 (diff)
downloadnetifd-595094f5c213fa301b0304c1e0732811740b4db6.tar.gz
device: do not pull device present state from hotplug events
Use hotplug events as trigger for system_if_check instead. Fixes a race condition in event processing Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/device.c b/device.c
index 32e42a6..8513f72 100644
--- a/device.c
+++ b/device.c
@@ -1472,5 +1472,5 @@ void device_hotplug_event(const char *name, bool add)
if (!dev || dev->type != &simple_device_type)
return;
- device_set_present(dev, add);
+ system_if_check(dev);
}