summaryrefslogtreecommitdiff
path: root/src/libudev/libudev-device.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libudev/libudev-device.c')
-rw-r--r--src/libudev/libudev-device.c3
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) {