mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
leds: lp5521: Add an error check in lp5521_post_init_device
lp55xx_write() can return an error code, add a check for this. Signed-off-by: Su Hui <suhui@nfschina.com> Link: https://lore.kernel.org/r/20231020091930.207870-1-suhui@nfschina.com Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
parent
2038d3fdc7
commit
b9604be241
@ -301,6 +301,8 @@ static int lp5521_post_init_device(struct lp55xx_chip *chip)
|
||||
|
||||
/* Set all PWMs to direct control mode */
|
||||
ret = lp55xx_write(chip, LP5521_REG_OP_MODE, LP5521_CMD_DIRECT);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Update configuration for the clock setting */
|
||||
val = LP5521_DEFAULT_CFG;
|
||||
|
Loading…
Reference in New Issue
Block a user