OSDN Git Service

backlight: Propagate errors from get_brightness()
authorThomas Weißschuh <linux@weissschuh.net>
Tue, 7 Sep 2021 12:47:51 +0000 (14:47 +0200)
committerLee Jones <lee.jones@linaro.org>
Thu, 23 Sep 2021 09:48:00 +0000 (10:48 +0100)
commit563edf85ce18a90dd0a7b39e279a691d937205f6
tree488fbe262c7625113baa8425b2d86c9a82f9cc04
parent33a5471f8da976bf271a1ebbd6b9d163cb0cb6aa
backlight: Propagate errors from get_brightness()

backlight.h documents "struct backlight_ops->get_brightness()" to return
a negative errno on failure.

So far these errors have not been handled in the backlight core.
This leads to negative values being exposed through sysfs although only
positive values are documented to be reported.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/video/backlight/backlight.c