From 28541a3d7c8b1caf0bda5e812566a1f5e7956352 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Tue, 2 Jun 2015 16:53:36 +0200 Subject: [PATCH] udev-builtin: path_id - don't pass NULL to udev_device_get_parent() Being explicit about this makes the code easier to follow IMHO. --- src/udev/udev-builtin-path_id.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c index 0fa11f623087d..4ca0a69d7dbef 100644 --- a/src/udev/udev-builtin-path_id.c +++ b/src/udev/udev-builtin-path_id.c @@ -665,7 +665,8 @@ static int builtin_path_id(struct udev_device *dev, int argc, char *argv[], bool supported_parent = true; } - parent = udev_device_get_parent(parent); + if (parent) + parent = udev_device_get_parent(parent); } /*