lkml.org 
[lkml]   [2023]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2] spi: fsl-dspi: Use dev_err_probe() in dspi_request_dma()
Tue, Jul 25, 2023 at 11:50:37AM +0800, Minjie Du kirjoitti:
> It is possible for dma_request_chan() to return EPROBE_DEFER, which means
> dev is not ready yet.
> At this point dev_err() will have no output.

...

> if (IS_ERR(dma->chan_tx)) {

> - dev_err(dev, "tx dma channel not available\n");
> ret = PTR_ERR(dma->chan_tx);
> + dev_err_probe(dev, ret, "tx dma channel not available\n");

It can be even simpler

ret = dev_err_probe(dev, PTR_ERR(dma->chan_tx), "tx dma channel not available\n");

> goto err_tx_channel;
> }

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2023-07-27 23:07    [W:0.040 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site