summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/asus-wmi.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2014-11-24 22:30:29 +0300
committerDarren Hart <dvhart@linux.intel.com>2014-12-03 21:10:14 +0300
commit0098181016dd45c1c417656ba36b87d9101cbb83 (patch)
treeadb5cead8a3f2307e94918ac9369c95e7b2166c9 /drivers/platform/x86/asus-wmi.c
parenta39f46df33c6847399f9b41b74ef09a4095fb996 (diff)
downloadlinux-0098181016dd45c1c417656ba36b87d9101cbb83.tar.xz
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 <elfring@users.sourceforge.net> For msi-wmi.c: Acked-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Diffstat (limited to 'drivers/platform/x86/asus-wmi.c')
-rw-r--r--drivers/platform/x86/asus-wmi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 21fc932da3a1..7543a56e0f45 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -1308,8 +1308,7 @@ static int asus_wmi_backlight_init(struct asus_wmi *asus)
static void asus_wmi_backlight_exit(struct asus_wmi *asus)
{
- if (asus->backlight_device)
- backlight_device_unregister(asus->backlight_device);
+ backlight_device_unregister(asus->backlight_device);
asus->backlight_device = NULL;
}