X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flibudev%2Flibudev-device.c;h=5f196bd9b8aa7dea78255117bd1f9d963cf2a380;hb=5c3026927de9dfa60ad6ae8326fef5d7824e723e;hp=fc7d9287217e77cab2b3900b721f1e3476addb59;hpb=ff49bc3212cb07d850dcfd59940539773a0be26f;p=elogind.git diff --git a/src/libudev/libudev-device.c b/src/libudev/libudev-device.c index fc7d92872..5f196bd9b 100644 --- a/src/libudev/libudev-device.c +++ b/src/libudev/libudev-device.c @@ -534,10 +534,8 @@ int udev_device_read_db(struct udev_device *udev_device, const char *dbfile) } f = fopen(dbfile, "re"); - if (f == NULL) { - log_debug("no db file to read %s: %m", dbfile); - return -errno; - } + if (f == NULL) + return log_debug_errno(errno, "no db file to read %s: %m", dbfile); /* devices with a database entry are initialized */ udev_device->is_initialized = true;