diff options
| -rw-r--r-- | drivers/video/backlight/adp8860_bl.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/video/backlight/adp8860_bl.c b/drivers/video/backlight/adp8860_bl.c index f0d4c0324580..510e559c060e 100644 --- a/drivers/video/backlight/adp8860_bl.c +++ b/drivers/video/backlight/adp8860_bl.c | |||
| @@ -566,11 +566,13 @@ static ssize_t adp8860_bl_ambient_light_level_show(struct device *dev, | |||
| 566 | 566 | ||
| 567 | mutex_lock(&data->lock); | 567 | mutex_lock(&data->lock); |
| 568 | error = adp8860_read(data->client, ADP8860_PH1LEVL, ®_val); | 568 | error = adp8860_read(data->client, ADP8860_PH1LEVL, ®_val); |
| 569 | ret_val = reg_val; | 569 | if (!error) { |
| 570 | error |= adp8860_read(data->client, ADP8860_PH1LEVH, ®_val); | 570 | ret_val = reg_val; |
| 571 | error = adp8860_read(data->client, ADP8860_PH1LEVH, ®_val); | ||
| 572 | } | ||
| 571 | mutex_unlock(&data->lock); | 573 | mutex_unlock(&data->lock); |
| 572 | 574 | ||
| 573 | if (error < 0) | 575 | if (error) |
| 574 | return error; | 576 | return error; |
| 575 | 577 | ||
| 576 | /* Return 13-bit conversion value for the first light sensor */ | 578 | /* Return 13-bit conversion value for the first light sensor */ |
