diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2024-03-05 09:12:00 +0100 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2024-03-07 09:03:29 +0000 |
commit | b4c385b294a48502d9654a1910e6a9976a1165c6 (patch) | |
tree | f43ec710415bf2109df7297beea7a7e50f9522ac /drivers/video | |
parent | 41f1b3edb581db7905ddae6b78bd5777aa1089b4 (diff) |
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>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/backlight/lm3630a_bl.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/video/backlight/lm3630a_bl.c b/drivers/video/backlight/lm3630a_bl.c index e6c0916ec88b..bb80ad51ca0d 100644 --- a/drivers/video/backlight/lm3630a_bl.c +++ b/drivers/video/backlight/lm3630a_bl.c @@ -560,10 +560,9 @@ static int lm3630a_probe(struct i2c_client *client) /* pwm */ if (pdata->pwm_ctrl != LM3630A_PWM_DISABLE) { pchip->pwmd = devm_pwm_get(pchip->dev, "lm3630a-pwm"); - if (IS_ERR(pchip->pwmd)) { - dev_err(&client->dev, "fail : get pwm device\n"); - return PTR_ERR(pchip->pwmd); - } + if (IS_ERR(pchip->pwmd)) + return dev_err_probe(&client->dev, PTR_ERR(pchip->pwmd), + "fail : get pwm device\n"); pwm_init_state(pchip->pwmd, &pchip->pwmd_state); } |