[PATCH] Don't try to print major/minor for devices without a dev file.

This commit is contained in:
kay.sievers@vrfy.org 2004-11-19 04:03:52 +01:00 committed by Greg KH
parent fc2aa29613
commit c02ae2fe33

View File

@ -142,7 +142,7 @@ static int print_device_chain(const char *path)
/* look for the 'dev' file */
attr = sysfs_get_classdev_attr(class_dev, "dev");
if (attr == NULL)
if (attr != NULL)
printf("device '%s' has major:minor %s", class_dev->path, attr->value);
/* open sysfs class device directory and print all attributes */