summaryrefslogtreecommitdiff
path: root/src/udev/udev-builtin-path_id.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-06-02 16:53:36 +0200
committerTom Gundersen <teg@jklm.no>2015-06-02 18:12:47 +0200
commit28541a3d7c8b1caf0bda5e812566a1f5e7956352 (patch)
tree27c20173d11e5cdcfe8e1dd70354ae431567111d /src/udev/udev-builtin-path_id.c
parent3b64e4d4f40baac56148c7d333d6a0053358ec7a (diff)
udev-builtin: path_id - don't pass NULL to udev_device_get_parent()
Being explicit about this makes the code easier to follow IMHO.
Diffstat (limited to 'src/udev/udev-builtin-path_id.c')
-rw-r--r--src/udev/udev-builtin-path_id.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c
index 0fa11f6230..4ca0a69d7d 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);
}
/*