[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230710191550.7y6wukf7w44us4pd@pengutronix.de>
Date: Mon, 10 Jul 2023 21:15:50 +0200
From: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
To: Thierry Reding <thierry.reding@...il.com>
Cc: Guiting Shen <aarongt.shen@...il.com>,
claudiu.beznea@...rochip.com, nicolas.ferre@...rochip.com,
alexandre.belloni@...tlin.com,
linux-arm-kernel@...ts.infradead.org, linux-pwm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] pwm: atmel: enable clk when pwm already enabled in
bootloader
Hello,
On Mon, Jul 10, 2023 at 05:00:45PM +0200, Thierry Reding wrote:
> On Mon, Jul 10, 2023 at 10:42:14PM +0800, Guiting Shen wrote:
> > + err = clk_enable(atmel_pwm->clk);
> > + if (err) {
> > + dev_err(atmel_pwm->chip.dev, "enable clock error\n");
>
> Might be worth to include the error code in the error message to make it
> easier to diagnose where the issue is. Something like:
>
> dev_err(atmel_pwm->chip.dev, "failed to enable clock: %d\n", err);
Or (IMHO) still better:
dev_err(atmel_pwm->chip.dev, "failed to enable clock: %pe\n", ERR_PTR(err));
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists