diff --git a/src/libdt.c b/src/libdt.c index 4a3ce1e..61a0706 100644 --- a/src/libdt.c +++ b/src/libdt.c @@ -2040,8 +2040,12 @@ part = device_find_partition(op->dev, name); if (part) { - op->devpath = strdup(udev_device_get_devnode(part)); - pr_debug("%s: found part '%s'\n", __func__, name); + if (udev_device_get_devnode(part) != NULL) { + op->devpath = strdup(udev_device_get_devnode(part)); + pr_debug("%s: found part '%s'\n", __func__, name); + } else { + pr_debug("%s: '%s' not found\n", __func__, name); + } return 0; }