path: root/discover/udev.c
diff options
authorJeremy Kerr <>2014-04-17 11:47:39 +0800
committerJeremy Kerr <>2014-04-17 11:50:39 +0800
commitb6ee414890fcd582a96f4d89e648cff5dacb1cb9 (patch)
tree180fbb277871e340374041f6f648ef2f5d7e45c6 /discover/udev.c
parent8245f2555d8a253238be888cf3e5693a2e7cbefc (diff)
discover/udev: NULL return from udev_enumerate_get_list_entry isn't an error
A NULL return can mean the list is empty; don't return a failure from this case. udev_list_entry_foreach does a check for a NULL entry, so we'll do the correct thing in the following loop. Signed-off-by: Jeremy Kerr <>
Diffstat (limited to 'discover/udev.c')
1 files changed, 0 insertions, 5 deletions
diff --git a/discover/udev.c b/discover/udev.c
index 00b6df7..6ccb8d4 100644
--- a/discover/udev.c
+++ b/discover/udev.c
@@ -321,11 +321,6 @@ static int udev_enumerate(struct udev *udev)
list = udev_enumerate_get_list_entry(enumerate);
- if (!list) {
- pb_log("udev_enumerate_get_list_entry failed\n");
- goto fail;
- }
udev_list_entry_foreach(entry, list) {
const char *syspath;
struct udev_device *dev;
OpenPOWER on IntegriCloud