From 0098181016dd45c1c417656ba36b87d9101cbb83 Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Mon, 24 Nov 2014 20:30:29 +0100 Subject: platform: x86: Deletion of checks 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 For msi-wmi.c: Acked-by: Anisse Astier Signed-off-by: Darren Hart --- drivers/platform/x86/ideapad-laptop.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/platform/x86/ideapad-laptop.c') diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c index ed494f37c40f..31630612dd80 100644 --- a/drivers/platform/x86/ideapad-laptop.c +++ b/drivers/platform/x86/ideapad-laptop.c @@ -729,8 +729,7 @@ static int ideapad_backlight_init(struct ideapad_private *priv) static void ideapad_backlight_exit(struct ideapad_private *priv) { - if (priv->blightdev) - backlight_device_unregister(priv->blightdev); + backlight_device_unregister(priv->blightdev); priv->blightdev = NULL; } -- cgit