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>
This commit is contained in:

committed by
Darren Hart

parent
a39f46df33
commit
0098181016
@@ -271,8 +271,7 @@ static int oaktrail_backlight_init(void)
|
||||
|
||||
static void oaktrail_backlight_exit(void)
|
||||
{
|
||||
if (oaktrail_bl_device)
|
||||
backlight_device_unregister(oaktrail_bl_device);
|
||||
backlight_device_unregister(oaktrail_bl_device);
|
||||
}
|
||||
|
||||
static int oaktrail_probe(struct platform_device *pdev)
|
||||
|
Reference in New Issue
Block a user