mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-17 00:57:33 +07:00
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: Arvind Yadav <arvind.yadav.cs@gmail.com> Acked-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
This commit is contained in:
parent
0b8dba15e9
commit
90a864b965
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user