diff options
author | Tom Gundersen <teg@jklm.no> | 2015-06-01 23:51:37 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-06-02 18:12:47 +0200 |
commit | 4189708ad0cde8e211e38d27de943579772f8869 (patch) | |
tree | 1b149a4f2b419c668e59822b304f3c9d06034f35 /src/libudev | |
parent | d4cb0234908e08093aab3b90bc36574f53bca424 (diff) |
sd-device: get_subsystem - don't complain if a device does not have a subsystem
Diffstat (limited to 'src/libudev')
-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 893d72c19f..c27b01db96 100644 --- a/src/libudev/libudev-device.c +++ b/src/libudev/libudev-device.c @@ -178,7 +178,8 @@ _public_ const char *udev_device_get_subsystem(struct udev_device *udev_device) if (r < 0) { errno = -r; return NULL; - } + } else if (!subsystem) + errno = ENODATA; return subsystem; } |