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 <daniel.thompson@linaro.org> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240305-backlight-probe-v2-5-609b0cf24bde@linaro.org Signed-off-by: Lee Jones <lee@kernel.org>
1 parent 41f1b3e commit b4c385b

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

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)