Linux cryptographic layer development
 help / color / mirror / Atom feed
From: <Ryan.Wanner@microchip.com>
To: <machel@vivo.com>, <herbert@gondor.apana.org.au>,
	<davem@davemloft.net>, <Nicolas.Ferre@microchip.com>,
	<alexandre.belloni@bootlin.com>, <Claudiu.Beznea@microchip.com>,
	<linux-crypto@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Cc: <opensource.kernel@vivo.com>
Subject: Re: [PATCH v2] crypto: atmel: Use dev_err_probe instead of dev_err
Date: Wed, 26 Jul 2023 15:54:39 +0000	[thread overview]
Message-ID: <48f16656-af30-cd6f-5adf-8b7dac0818a0@microchip.com> (raw)
In-Reply-To: <20230726120451.6099-1-machel@vivo.com>

On 7/26/23 05:04, Wang Ming wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> It is possible that dma_request_chan will return EPROBE_DEFER,
> which means that dd->dev is not ready yet. In this case,
> dev_err(dd->dev), there will be no output. This patch fixes the bug.
> 
> Signed-off-by: Wang Ming <machel@vivo.com>
Reviewed-by: Ryan Wanner <Ryan.Wanner@microchip.com>
> ---
>  drivers/crypto/atmel-sha.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/crypto/atmel-sha.c b/drivers/crypto/atmel-sha.c
> index 6bef634d3c86..5682957f805d 100644
> --- a/drivers/crypto/atmel-sha.c
> +++ b/drivers/crypto/atmel-sha.c
> @@ -2499,8 +2499,8 @@ static int atmel_sha_dma_init(struct atmel_sha_dev *dd)
>  {
>         dd->dma_lch_in.chan = dma_request_chan(dd->dev, "tx");
>         if (IS_ERR(dd->dma_lch_in.chan)) {
> -               dev_err(dd->dev, "DMA channel is not available\n");
> -               return PTR_ERR(dd->dma_lch_in.chan);
> +               return dev_err_probe(dd->dev, PTR_ERR(dd->dma_lch_in.chan),
> +                       "DMA channel is not available\n");
>         }
> 
>         dd->dma_lch_in.dma_conf.dst_addr = dd->phys_base +
> --
> 2.25.1
> 


  reply	other threads:[~2023-07-26 15:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-26 12:04 [PATCH v2] crypto: atmel: Use dev_err_probe instead of dev_err Wang Ming
2023-07-26 15:54 ` Ryan.Wanner [this message]
2023-08-04  9:34 ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48f16656-af30-cd6f-5adf-8b7dac0818a0@microchip.com \
    --to=ryan.wanner@microchip.com \
    --cc=Claudiu.Beznea@microchip.com \
    --cc=Nicolas.Ferre@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=machel@vivo.com \
    --cc=opensource.kernel@vivo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox