All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] crypto: jh7110 - Correct deferred probe return
       [not found] <CGME20231109063323epcas2p13d88ce8e8251dfa4eba4662c38cc08c9@epcas2p1.samsung.com>
@ 2023-11-09  6:32 ` Chanho Park
  2023-11-09  9:09   ` Jia Jie Ho
  2023-11-17 11:25   ` Herbert Xu
  0 siblings, 2 replies; 3+ messages in thread
From: Chanho Park @ 2023-11-09  6:32 UTC (permalink / raw)
  To: Herbert Xu, David S . Miller, Jia Jie Ho, William Qiu,
	linux-crypto
  Cc: Chanho Park

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;
 }
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] crypto: jh7110 - Correct deferred probe return
  2023-11-09  6:32 ` [PATCH] crypto: jh7110 - Correct deferred probe return Chanho Park
@ 2023-11-09  9:09   ` Jia Jie Ho
  2023-11-17 11:25   ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Jia Jie Ho @ 2023-11-09  9:09 UTC (permalink / raw)
  To: Chanho Park, Herbert Xu, David S . Miller, William Qiu,
	linux-crypto

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] crypto: jh7110 - Correct deferred probe return
  2023-11-09  6:32 ` [PATCH] crypto: jh7110 - Correct deferred probe return Chanho Park
  2023-11-09  9:09   ` Jia Jie Ho
@ 2023-11-17 11:25   ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2023-11-17 11:25 UTC (permalink / raw)
  To: Chanho Park; +Cc: David S . Miller, Jia Jie Ho, William Qiu, linux-crypto

On Thu, Nov 09, 2023 at 03:32:59PM +0900, 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(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-11-17 11:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [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
2023-11-17 11:25   ` Herbert Xu

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.