summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/device.c b/src/core/device.c
index b5d9d827e2..dca2a82256 100644
--- a/src/core/device.c
+++ b/src/core/device.c
@@ -325,7 +325,7 @@ static int device_setup_unit(Manager *m, struct udev_device *dev, const char *pa
fail:
log_unit_warning_errno(u->id, r, "Failed to set up device unit: %m");
- if (delete && u)
+ if (delete)
unit_free(u);
return r;