backlight: as3711_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-4-609b0cf24bde@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
Krzysztof Kozlowski 2024-03-05 09:11:59 +01:00 committed by Lee Jones
parent a2cd3ab2a4
commit 41f1b3edb5
1 changed files with 2 additions and 4 deletions

View File

@ -383,10 +383,8 @@ static int as3711_backlight_probe(struct platform_device *pdev)
if (pdev->dev.parent->of_node) {
ret = as3711_backlight_parse_dt(&pdev->dev);
if (ret < 0) {
dev_err(&pdev->dev, "DT parsing failed: %d\n", ret);
return ret;
}
if (ret < 0)
return dev_err_probe(&pdev->dev, ret, "DT parsing failed\n");
}
if (!pdata->su1_fb && !pdata->su2_fb) {