From 527ead383da37d68bd8ac11d7465481c60243076 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Fri, 23 Nov 2018 09:16:11 +0100 Subject: libudev: drop unnecessary check sd_device_get_subsystem returns -ENOENT if subsystem is not set. --- src/libudev/libudev-device.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/libudev/libudev-device.c') diff --git a/src/libudev/libudev-device.c b/src/libudev/libudev-device.c index 19695b5ee4..1e7d774ba9 100644 --- a/src/libudev/libudev-device.c +++ b/src/libudev/libudev-device.c @@ -150,8 +150,6 @@ _public_ const char *udev_device_get_subsystem(struct udev_device *udev_device) r = sd_device_get_subsystem(udev_device->device, &subsystem); if (r < 0) return_with_errno(NULL, r); - if (!subsystem) - return_with_errno(NULL, ENODATA); return subsystem; } -- cgit v1.2.3