Re: [PATCH 3/7] crypto: atmel-tdes: Drop if with an always false condition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 tdes_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@xxxxxxxxxxxxxx>

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


> ---
>  drivers/crypto/atmel-tdes.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/crypto/atmel-tdes.c b/drivers/crypto/atmel-tdes.c
> index 9fd7b8e439d2..a5e78aa08bf0 100644
> --- a/drivers/crypto/atmel-tdes.c
> +++ b/drivers/crypto/atmel-tdes.c
> @@ -1266,8 +1266,7 @@ static int atmel_tdes_remove(struct platform_device *pdev)
>         struct atmel_tdes_dev *tdes_dd;
> 
>         tdes_dd = platform_get_drvdata(pdev);
> -       if (!tdes_dd)
> -               return -ENODEV;
> +
>         spin_lock(&atmel_tdes.lock);
>         list_del(&tdes_dd->list);
>         spin_unlock(&atmel_tdes.lock);
> --
> 2.36.1
> 





[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux