summaryrefslogtreecommitdiff
path: root/src/udev
diff options
context:
space:
mode:
Diffstat (limited to 'src/udev')
-rw-r--r--src/udev/udev-builtin-hwdb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/udev/udev-builtin-hwdb.c b/src/udev/udev-builtin-hwdb.c
index 234448cdf1..0b35d799fe 100644
--- a/src/udev/udev-builtin-hwdb.c
+++ b/src/udev/udev-builtin-hwdb.c
@@ -33,6 +33,9 @@ int udev_builtin_hwdb_lookup(struct udev_device *dev, const char *modalias, bool
struct udev_list_entry *entry;
int n = 0;
+ if (!hwdb)
+ return -ENOENT;
+
udev_list_entry_foreach(entry, udev_hwdb_get_properties_list_entry(hwdb, modalias, 0)) {
if (udev_builtin_add_property(dev, test,
udev_list_entry_get_name(entry),