From 2bb9e6203dc329f69a7180431d1b61f4e9529afa Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen Date: Tue, 7 Apr 2015 19:34:40 +0200 Subject: 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. --- src/core/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/device.c') 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; -- cgit v1.2.3-54-g00ecf