From: Uwe Kleine-König Date: Wed, 12 Aug 2020 07:52:14 +0000 (+0200) Subject: pwm: ab8500: Add error message if pwmchip_add() fails X-Git-Tag: v5.15~1631^2~40 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2e978a4564b82c0b5e31e23f5e7ea8bb9d6a23f7;p=platform%2Fkernel%2Flinux-starfive.git pwm: ab8500: Add error message if pwmchip_add() fails pwmchip_add() doesn't emit an error message, so add one in the driver. Signed-off-by: Uwe Kleine-König Reviewed-by: Linus Walleij Signed-off-by: Thierry Reding --- diff --git a/drivers/pwm/pwm-ab8500.c b/drivers/pwm/pwm-ab8500.c index fdf3964..4b6f9e2 100644 --- a/drivers/pwm/pwm-ab8500.c +++ b/drivers/pwm/pwm-ab8500.c @@ -106,7 +106,7 @@ static int ab8500_pwm_probe(struct platform_device *pdev) err = pwmchip_add(&ab8500->chip); if (err < 0) - return err; + return dev_err_probe(&pdev->dev, err, "Failed to add pwm chip\n"); dev_dbg(&pdev->dev, "pwm probe successful\n"); platform_set_drvdata(pdev, ab8500);