diff options
author | Tom Gundersen <teg@jklm.no> | 2015-07-20 09:25:52 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2015-07-20 09:25:52 -0400 |
commit | 3df635050b4068089d5477b9423de06c6a39bdee (patch) | |
tree | 13c8f3b9aaab580185529375e362d886bceac64b /src/libudev/libudev-device.c | |
parent | 8ba53c912babe8d26c0796f971f423e58736e21a (diff) |
sd-device: get_subsystem - don't complain if a device does not have a subsystem
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/libudev/libudev-device.c')
-rw-r--r-- | src/libudev/libudev-device.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libudev/libudev-device.c b/src/libudev/libudev-device.c index ed9964ac44..1cfcbe10b6 100644 --- a/src/libudev/libudev-device.c +++ b/src/libudev/libudev-device.c @@ -722,7 +722,8 @@ static struct udev_device *udev_device_new(struct udev *udev) if (udev == NULL) { errno = EINVAL; return NULL; - } + } else if (!subsystem) + errno = ENODATA; udev_device = new0(struct udev_device, 1); if (udev_device == NULL) { |