summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--udevinfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/udevinfo.c b/udevinfo.c
index 013068541e..901990ede6 100644
--- a/udevinfo.c
+++ b/udevinfo.c
@@ -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 */