Linux cryptographic layer development
 help / color / mirror / Atom feed
From: <Claudiu.Beznea@microchip.com>
To: <u.kleine-koenig@pengutronix.de>, <herbert@gondor.apana.org.au>,
	<davem@davemloft.net>, <Nicolas.Ferre@microchip.com>,
	<alexandre.belloni@bootlin.com>
Cc: <linux-crypto@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>, <kernel@pengutronix.de>
Subject: Re: [PATCH 2/7] crypto: atmel-sha: Drop if with an always false condition
Date: Wed, 6 Jul 2022 08:47:21 +0000	[thread overview]
Message-ID: <5a29e68f-691c-267a-f270-b5955ff73e08@microchip.com> (raw)
In-Reply-To: <20220705205144.131702-2-u.kleine-koenig@pengutronix.de>

On 05.07.2022 23:51, Uwe Kleine-König wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> The remove callback is only called after probe completed successfully.
> In this case platform_set_drvdata() was called with a non-NULL argument
> and so sha_dd is never NULL.
> 
> This is a preparation for making platform remove callbacks return void.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>


> ---
>  drivers/crypto/atmel-sha.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/crypto/atmel-sha.c b/drivers/crypto/atmel-sha.c
> index d1628112dacc..e054e0ac6fc2 100644
> --- a/drivers/crypto/atmel-sha.c
> +++ b/drivers/crypto/atmel-sha.c
> @@ -2669,8 +2669,7 @@ static int atmel_sha_remove(struct platform_device *pdev)
>         struct atmel_sha_dev *sha_dd;
> 
>         sha_dd = platform_get_drvdata(pdev);
> -       if (!sha_dd)
> -               return -ENODEV;
> +
>         spin_lock(&atmel_sha.lock);
>         list_del(&sha_dd->list);
>         spin_unlock(&atmel_sha.lock);
> --
> 2.36.1
> 


  reply	other threads:[~2022-07-06  8:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-05 20:51 [PATCH 1/7] crypto: atmel-aes: Drop if with an always false condition Uwe Kleine-König
2022-07-05 20:51 ` [PATCH 2/7] crypto: atmel-sha: " Uwe Kleine-König
2022-07-06  8:47   ` Claudiu.Beznea [this message]
2022-07-05 20:51 ` [PATCH 3/7] crypto: atmel-tdes: " Uwe Kleine-König
2022-07-06  8:58   ` Claudiu.Beznea
2022-07-05 20:51 ` [PATCH 4/7] crypto: omap-aes: " Uwe Kleine-König
2022-07-05 20:51 ` [PATCH 5/7] crypto: omap-des: " Uwe Kleine-König
2022-07-05 20:51 ` [PATCH 6/7] crypto: omap-sham: " Uwe Kleine-König
2022-07-05 20:51 ` [PATCH 7/7] crypto: s5p-sss: " Uwe Kleine-König
2022-07-05 21:47   ` Vladimir Zapolskiy
2022-07-06  6:34   ` Krzysztof Kozlowski
2022-07-15  8:47 ` [PATCH 1/7] crypto: atmel-aes: " 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=5a29e68f-691c-267a-f270-b5955ff73e08@microchip.com \
    --to=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=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /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