All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jia Jie Ho <jiajie.ho@starfivetech.com>
To: Chanho Park <chanho61.park@samsung.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S . Miller" <davem@davemloft.net>,
	William Qiu <william.qiu@starfivetech.com>,
	<linux-crypto@vger.kernel.org>
Subject: Re: [PATCH] crypto: jh7110 - Correct deferred probe return
Date: Thu, 9 Nov 2023 17:09:04 +0800	[thread overview]
Message-ID: <93d63708-a2a8-9931-de9c-2c94fe288a88@starfivetech.com> (raw)
In-Reply-To: <20231109063259.3427055-1-chanho61.park@samsung.com>

On 9/11/2023 2:32 pm, Chanho Park wrote:
> This fixes list_add corruption error when the driver is returned
> with -EPROBE_DEFER. It is also required to roll back the previous
> probe sequences in case of deferred_probe. So, this removes
> 'err_probe_defer" goto label and just use err_dma_init instead.
> 
> Fixes: 42ef0e944b01 ("crypto: starfive - Add crypto engine support")
> Signed-off-by: Chanho Park <chanho61.park@samsung.com>
> ---
>  drivers/crypto/starfive/jh7110-cryp.c | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/crypto/starfive/jh7110-cryp.c b/drivers/crypto/starfive/jh7110-cryp.c
> index 08e974e0dd12..3a67ddc4d936 100644
> --- a/drivers/crypto/starfive/jh7110-cryp.c
> +++ b/drivers/crypto/starfive/jh7110-cryp.c
> @@ -180,12 +180,8 @@ static int starfive_cryp_probe(struct platform_device *pdev)
>  	spin_unlock(&dev_list.lock);
>  
>  	ret = starfive_dma_init(cryp);
> -	if (ret) {
> -		if (ret == -EPROBE_DEFER)
> -			goto err_probe_defer;
> -		else
> -			goto err_dma_init;
> -	}
> +	if (ret)
> +		goto err_dma_init;
>  
>  	/* Initialize crypto engine */
>  	cryp->engine = crypto_engine_alloc_init(&pdev->dev, 1);
> @@ -233,7 +229,7 @@ static int starfive_cryp_probe(struct platform_device *pdev)
>  
>  	tasklet_kill(&cryp->aes_done);
>  	tasklet_kill(&cryp->hash_done);
> -err_probe_defer:
> +
>  	return ret;
>  }
>  

Reviewed-by: Jia Jie Ho <jiajie.ho@starfivetech.com>

Thanks for catching this.

Regards,
Jia Jie

  reply	other threads:[~2023-11-09  9:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20231109063323epcas2p13d88ce8e8251dfa4eba4662c38cc08c9@epcas2p1.samsung.com>
2023-11-09  6:32 ` [PATCH] crypto: jh7110 - Correct deferred probe return Chanho Park
2023-11-09  9:09   ` Jia Jie Ho [this message]
2023-11-17 11:25   ` 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=93d63708-a2a8-9931-de9c-2c94fe288a88@starfivetech.com \
    --to=jiajie.ho@starfivetech.com \
    --cc=chanho61.park@samsung.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=william.qiu@starfivetech.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.