summaryrefslogtreecommitdiff
path: root/drivers/video/backlight
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/backlight')
-rw-r--r--drivers/video/backlight/lp855x_bl.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/video/backlight/lp855x_bl.c b/drivers/video/backlight/lp855x_bl.c
index 61a7f45bfad8..da1f124db69c 100644
--- a/drivers/video/backlight/lp855x_bl.c
+++ b/drivers/video/backlight/lp855x_bl.c
@@ -241,19 +241,17 @@ static int lp855x_bl_update_status(struct backlight_device *bl)
{
struct lp855x *lp = bl_get_data(bl);
int brightness = bl->props.brightness;
- int ret;
if (bl->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK))
brightness = 0;
if (lp->mode == PWM_BASED)
- ret = lp855x_pwm_ctrl(lp, brightness,
+ return lp855x_pwm_ctrl(lp, brightness,
bl->props.max_brightness);
else if (lp->mode == REGISTER_BASED)
- ret = lp855x_write_byte(lp, lp->cfg->reg_brightness,
+ return lp855x_write_byte(lp, lp->cfg->reg_brightness,
(u8)brightness);
-
- return ret;
+ return -EINVAL;
}
static const struct backlight_ops lp855x_bl_ops = {