chiark / gitweb /
udev: check the return value from udev_enumerate_scan_devices
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Wed, 4 Jun 2014 21:40:43 +0000 (23:40 +0200)
committerKay Sievers <kay@vrfy.org>
Tue, 10 Jun 2014 17:06:50 +0000 (19:06 +0200)
The return value from udev_enumerate_scan_devices was stored but
never used. I assume this was meant to be checked.

src/udev/udevd.c

index 160360e..a45d324 100644 (file)
@@ -780,6 +780,8 @@ static int synthesize_change(struct udev_device *dev) {
                         return r;
 
                 r = udev_enumerate_scan_devices(e);
+                if (r < 0)
+                        return r;
 
                 udev_list_entry_foreach(item, udev_enumerate_get_list_entry(e)) {
                         _cleanup_udev_device_unref_ struct udev_device *d = NULL;