提交 90a864b9 编写于 作者: A Arvind Yadav 提交者: Andy Shevchenko

platform/x86: dell-laptop: Handle return error form dell_get_intensity.

Here, This patch is to handle a return error from dell_get_intensity.
This change is done using Coccinelle.
Signed-off-by: NArvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: NPali Rohár <pali.rohar@gmail.com>
Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
上级 0b8dba15
......@@ -2151,11 +2151,17 @@ static int __init dell_init(void)
dell_backlight_device->props.brightness =
dell_get_intensity(dell_backlight_device);
if (dell_backlight_device->props.brightness < 0) {
ret = dell_backlight_device->props.brightness;
goto fail_get_brightness;
}
backlight_update_status(dell_backlight_device);
}
return 0;
fail_get_brightness:
backlight_device_unregister(dell_backlight_device);
fail_backlight:
dell_cleanup_rfkill();
fail_rfkill:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册