summaryrefslogtreecommitdiffstats
path: root/discover/udev.c
diff options
context:
space:
mode:
Diffstat (limited to 'discover/udev.c')
-rw-r--r--discover/udev.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/discover/udev.c b/discover/udev.c
index 656c5ab..317b4bc 100644
--- a/discover/udev.c
+++ b/discover/udev.c
@@ -398,10 +398,8 @@ static int udev_process(void *arg)
struct udev_monitor *monitor = arg;
struct udev_device *dev;
const char *action;
- int result;
dev = udev_monitor_receive_device(monitor);
-
if (!dev) {
pb_log("udev_monitor_receive_device failed\n");
return -1;
@@ -411,17 +409,12 @@ static int udev_process(void *arg)
if (!action) {
pb_log("udev_device_get_action failed\n");
- goto fail;
+ } else {
+ udev_handle_dev_action(dev, action);
}
- result = udev_handle_dev_action(dev, action);
-
udev_device_unref(dev);
- return result;
-
-fail:
- udev_device_unref(dev);
- return -1;
+ return 0;
}
static void udev_log_fn(struct udev __attribute__((unused)) *udev,
OpenPOWER on IntegriCloud