From: Markus Elfring Date: Fri, 22 Jul 2016 12:45:51 +0000 (+0200) Subject: drm/bridge: ps8622: Delete an unnecessary check before backlight_device_unregister() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4cf090e10b7be0ebb0c4a06b93bd4cfaec1b6173;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/bridge: ps8622: Delete an unnecessary check before backlight_device_unregister() The backlight_device_unregister() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/791089e4-201c-ad01-9c3b-f49835765177@users.sourceforge.net --- diff --git a/drivers/gpu/drm/bridge/parade-ps8622.c b/drivers/gpu/drm/bridge/parade-ps8622.c index 5cd8dd7e5904..583b8ce614e3 100644 --- a/drivers/gpu/drm/bridge/parade-ps8622.c +++ b/drivers/gpu/drm/bridge/parade-ps8622.c @@ -636,9 +636,7 @@ static int ps8622_remove(struct i2c_client *client) { struct ps8622_bridge *ps8622 = i2c_get_clientdata(client); - if (ps8622->bl) - backlight_device_unregister(ps8622->bl); - + backlight_device_unregister(ps8622->bl); drm_bridge_remove(&ps8622->bridge); return 0;