Let dev_err_probe handle the -EPROBE_DEFER case and also add an entry to /sys/kernel/debug/devices_deferred when deferred. Signed-off-by: Alexander Stein <alexander.stein@xxxxxxxxxxxxxxx> --- drivers/video/backlight/pwm_bl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c index 289bd9ce4d36d..3825c2b67c53b 100644 --- a/drivers/video/backlight/pwm_bl.c +++ b/drivers/video/backlight/pwm_bl.c @@ -509,8 +509,7 @@ static int pwm_backlight_probe(struct platform_device *pdev) pb->pwm = devm_pwm_get(&pdev->dev, NULL); if (IS_ERR(pb->pwm)) { ret = PTR_ERR(pb->pwm); - if (ret != -EPROBE_DEFER) - dev_err(&pdev->dev, "unable to request PWM\n"); + dev_err_probe(&pdev->dev, ret, "unable to request PWM\n"); goto err_alloc; } -- 2.34.1