summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-01-18 07:58:07 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2019-01-18 07:58:07 +0300
commit2451f3717c538795fc9fade46916683ebf7ea959 (patch)
treeee1b4088622c8afb13f417ee1be5e091ed8a36a5 /drivers
parent0a2fbed84a962c486a71d2c91c86a31332dcbf02 (diff)
parent248b57015f35c94d4eae2fdd8c6febf5cd703900 (diff)
downloadlinux-2451f3717c538795fc9fade46916683ebf7ea959.tar.xz
Merge tag 'led-fix-for-5.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds
Pull LED fix from Jacek Anaszewski. * tag 'led-fix-for-5.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: leds: lp5523: fix a missing check of return value of lp55xx_read
Diffstat (limited to 'drivers')
-rw-r--r--drivers/leds/leds-lp5523.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c
index a2e74feee2b2..fd64df5a57a5 100644
--- a/drivers/leds/leds-lp5523.c
+++ b/drivers/leds/leds-lp5523.c
@@ -318,7 +318,9 @@ static int lp5523_init_program_engine(struct lp55xx_chip *chip)
/* Let the programs run for couple of ms and check the engine status */
usleep_range(3000, 6000);
- lp55xx_read(chip, LP5523_REG_STATUS, &status);
+ ret = lp55xx_read(chip, LP5523_REG_STATUS, &status);
+ if (ret)
+ return ret;
status &= LP5523_ENG_STATUS_MASK;
if (status != LP5523_ENG_STATUS_MASK) {