sd-device: get_subsystem - don't complain if a device does not have a subsystem

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
This commit is contained in:
Tom Gundersen 2015-07-20 09:25:52 -04:00 committed by Anthony G. Basile
parent 8ba53c912b
commit 3df635050b

View File

@ -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) {