device: remove unused null check

We dereference the variable right before the null check. We never reach
this point with a null value anyway so let's just remove it.
This commit is contained in:
Thomas Hindoe Paaboel Andersen
2015-04-07 21:11:38 +02:00
parent 889f25b2cc
commit 2bb9e6203d
+1 -1
View File
@@ -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;