sony-laptop: report failures on setting LCD brightness

Check if we were successful in setting the requested brightness and
report failure in that case.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>

authored by Mattia Dongili and committed by Matthew Garrett 6192fa71 9fbdaeb4

+3 -2
+3 -2
drivers/platform/x86/sony-laptop.c
··· 966 966 int *handle = (int *)bl_get_data(bd); 967 967 968 968 value = bd->props.brightness; 969 - sony_call_snc_handle(*handle, 0x0100 | (value << 16), &result); 969 + if (sony_call_snc_handle(*handle, 0x0100 | (value << 16), &result)) 970 + return -EIO; 970 971 971 - return sony_nc_get_brightness_ng(bd); 972 + return value; 972 973 } 973 974 974 975 static const struct backlight_ops sony_backlight_ops = {