[PATCH v6 36/40] ata: pata_ep93xx: remove legacy pinctrl use
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Wed Dec 13 10:33:49 PST 2023
On Wed, Dec 13, 2023 at 08:16:26PM +0200, Andy Shevchenko wrote:
> On Tue, Dec 12, 2023 at 11:20:53AM +0300, Nikita Shubin wrote:
> > Drop legacy acquire/release since we are using pinctrl for this now.
>
> ...
>
> > - if (IS_ERR(drv_data->dma_rx_channel)) {
> > + if (PTR_ERR_OR_ZERO(drv_data->dma_rx_channel)) {
>
> This seems incorrect.
>
> > ret = PTR_ERR(drv_data->dma_rx_channel);
> > return dev_err_probe(dev, ret, "rx DMA setup failed");
>
> return dev_err_probe(...);
>
> > }
>
> I think you wanted
>
> ret = PTR_ERR_OR_ZERO(drv_data->dma_rx_channel);
> if (ret)
> return dev_err_probe(dev, ret, "rx DMA setup failed");
How is that different from
if (IS_ERR(drv_data->dma_rx_channel))
return dev_err_probe(dev, PTR_ERR(drv_data->dma_rx_channel), "....");
(which seems to be more idiomatic to me)? While I was involved in
creating PTR_ERR_OR_ZERO, I don't particularily like it (today).
Also note that you want a \n at the end of error messages.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20231213/fdb75ca4/attachment-0001.sig>
More information about the linux-arm-kernel
mailing list