summaryrefslogtreecommitdiffstats
path: root/src/udev/udev-watch.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/udev/udev-watch.c5
1 files changed, 1 insertions, 4 deletions
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;