]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
device: remove unused null check
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Tue, 7 Apr 2015 17:34:40 +0000 (19:34 +0200)
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Tue, 7 Apr 2015 19:11:38 +0000 (21:11 +0200)
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.

src/core/device.c

index b5d9d827e2ea11d9c792d4fa98d2cced95a9dd78..dca2a82256a5c7da18b31ab6339b011453dcf996 100644 (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;