diff options
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 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; } |