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>
此提交包含在:
@@ -3141,8 +3141,7 @@ static void sony_nc_backlight_setup(void)
|
||||
|
||||
static void sony_nc_backlight_cleanup(void)
|
||||
{
|
||||
if (sony_bl_props.dev)
|
||||
backlight_device_unregister(sony_bl_props.dev);
|
||||
backlight_device_unregister(sony_bl_props.dev);
|
||||
}
|
||||
|
||||
static int sony_nc_add(struct acpi_device *device)
|
||||
|
新增問題並參考
封鎖使用者