From 78e9bb837c258ac0ec7712b3d612cc2f407e731e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 05:50:42 +0200 Subject: Merging upstream version 256. Signed-off-by: Daniel Baumann --- src/udev/udev-watch.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/udev/udev-watch.c') diff --git a/src/udev/udev-watch.c b/src/udev/udev-watch.c index 58c8279..258eb26 100644 --- a/src/udev/udev-watch.c +++ b/src/udev/udev-watch.c @@ -232,12 +232,9 @@ int udev_watch_end(int inotify_fd, sd_device *dev) { _cleanup_close_ int dirfd = -EBADF; int wd, r; + assert(inotify_fd >= 0); assert(dev); - /* This may be called by 'udevadm test'. In that case, inotify_fd is not initialized. */ - if (inotify_fd < 0) - return 0; - if (sd_device_get_devname(dev, NULL) < 0) return 0; -- cgit v1.2.3