Skip to content

Commit b4c385b

Browse files
krzklag-linaro
authored andcommitted
backlight: lm3630a_bl: Handle deferred probe
Don't pollute dmesg on deferred probe and simplify the code with dev_err_probe(). Reviewed-by: Daniel Thompson <[email protected]> Signed-off-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 41f1b3e commit b4c385b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/video/backlight/lm3630a_bl.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -560,10 +560,9 @@ static int lm3630a_probe(struct i2c_client *client)
560560
/* pwm */
561561
if (pdata->pwm_ctrl != LM3630A_PWM_DISABLE) {
562562
pchip->pwmd = devm_pwm_get(pchip->dev, "lm3630a-pwm");
563-
if (IS_ERR(pchip->pwmd)) {
564-
dev_err(&client->dev, "fail : get pwm device\n");
565-
return PTR_ERR(pchip->pwmd);
566-
}
563+
if (IS_ERR(pchip->pwmd))
564+
return dev_err_probe(&client->dev, PTR_ERR(pchip->pwmd),
565+
"fail : get pwm device\n");
567566

568567
pwm_init_state(pchip->pwmd, &pchip->pwmd_state);
569568
}

0 commit comments

Comments
 (0)