Subject: Re: [PATCH v2] spi: fsl-dspi: Use dev_err_probe() in dspi_request_dma()

From: [email-masked]
Date: Fri, 28 Jul 2023 00:07:05 +0300

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