From: Thomas Hindoe Paaboel Andersen Date: Tue, 7 Apr 2015 17:34:40 +0000 (+0200) Subject: device: remove unused null check X-Git-Tag: v220~549 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2bb9e6203dc329f69a7180431d1b61f4e9529afa;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/core/device.c b/src/core/device.c index b5d9d827e2e..dca2a82256a 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;