Linux cryptographic layer development
 help / color / mirror / Atom feed
* [PATCH] crypto: s5p-sss: remove redundant null check
@ 2020-09-03  8:37 ` Xu Wang
  2020-09-03  8:51   ` Krzysztof Kozlowski
                     ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Xu Wang @ 2020-09-03  8:37 UTC (permalink / raw)
  To: krzk, vz, k.konieczny, herbert, davem
  Cc: linux-crypto, linux-samsung-soc, linux-kernel

Because clk_disable_unprepare already checked NULL clock
parameter, so the additional checks are unnecessary, just remove them.

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
---
 drivers/crypto/s5p-sss.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c
index 341433fbcc4a..fdcbfd45c884 100644
--- a/drivers/crypto/s5p-sss.c
+++ b/drivers/crypto/s5p-sss.c
@@ -2307,8 +2307,7 @@ static int s5p_aes_probe(struct platform_device *pdev)
 	tasklet_kill(&pdata->tasklet);
 
 err_irq:
-	if (pdata->pclk)
-		clk_disable_unprepare(pdata->pclk);
+	clk_disable_unprepare(pdata->pclk);
 
 err_clk:
 	clk_disable_unprepare(pdata->clk);
@@ -2338,8 +2337,7 @@ static int s5p_aes_remove(struct platform_device *pdev)
 		pdata->use_hash = false;
 	}
 
-	if (pdata->pclk)
-		clk_disable_unprepare(pdata->pclk);
+	clk_disable_unprepare(pdata->pclk);
 
 	clk_disable_unprepare(pdata->clk);
 	s5p_dev = NULL;
-- 
2.17.1


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

* Re: [PATCH] crypto: s5p-sss: remove redundant null check
  2020-09-03  8:37 ` [PATCH] crypto: s5p-sss: remove redundant null check Xu Wang
@ 2020-09-03  8:51   ` Krzysztof Kozlowski
  2020-09-03  9:04   ` Kamil Konieczny
  2020-09-11  6:58   ` Herbert Xu
  2 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-03  8:51 UTC (permalink / raw)
  To: Xu Wang
  Cc: vz, k.konieczny, herbert, davem, linux-crypto, linux-samsung-soc,
	linux-kernel

On Thu, Sep 03, 2020 at 08:37:38AM +0000, Xu Wang wrote:
> Because clk_disable_unprepare already checked NULL clock
> parameter, so the additional checks are unnecessary, just remove them.
> 
> Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
> ---
>  drivers/crypto/s5p-sss.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

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

* Re: [PATCH] crypto: s5p-sss: remove redundant null check
  2020-09-03  8:37 ` [PATCH] crypto: s5p-sss: remove redundant null check Xu Wang
  2020-09-03  8:51   ` Krzysztof Kozlowski
@ 2020-09-03  9:04   ` Kamil Konieczny
  2020-09-11  6:58   ` Herbert Xu
  2 siblings, 0 replies; 4+ messages in thread
From: Kamil Konieczny @ 2020-09-03  9:04 UTC (permalink / raw)
  To: Xu Wang, krzk, vz, herbert, davem
  Cc: linux-crypto, linux-samsung-soc, linux-kernel



On 9/3/20 10:37 AM, Xu Wang wrote:
> Because clk_disable_unprepare already checked NULL clock
> parameter, so the additional checks are unnecessary, just remove them.
> 
> Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
> ---
>  drivers/crypto/s5p-sss.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c
> index 341433fbcc4a..fdcbfd45c884 100644
> --- a/drivers/crypto/s5p-sss.c
> +++ b/drivers/crypto/s5p-sss.c
> @@ -2307,8 +2307,7 @@ static int s5p_aes_probe(struct platform_device *pdev)
> [...]

Acked-by: Kamil Konieczny <k.konieczny@samsung.com>

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

* Re: [PATCH] crypto: s5p-sss: remove redundant null check
  2020-09-03  8:37 ` [PATCH] crypto: s5p-sss: remove redundant null check Xu Wang
  2020-09-03  8:51   ` Krzysztof Kozlowski
  2020-09-03  9:04   ` Kamil Konieczny
@ 2020-09-11  6:58   ` Herbert Xu
  2 siblings, 0 replies; 4+ messages in thread
From: Herbert Xu @ 2020-09-11  6:58 UTC (permalink / raw)
  To: Xu Wang
  Cc: krzk, vz, k.konieczny, davem, linux-crypto, linux-samsung-soc,
	linux-kernel

On Thu, Sep 03, 2020 at 08:37:38AM +0000, Xu Wang wrote:
> Because clk_disable_unprepare already checked NULL clock
> parameter, so the additional checks are unnecessary, just remove them.
> 
> Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
> ---
>  drivers/crypto/s5p-sss.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 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] 4+ messages in thread

end of thread, other threads:[~2020-09-11  6:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20200903083751eucas1p2e8419fda42358247a38e5f6c6b345414@eucas1p2.samsung.com>
2020-09-03  8:37 ` [PATCH] crypto: s5p-sss: remove redundant null check Xu Wang
2020-09-03  8:51   ` Krzysztof Kozlowski
2020-09-03  9:04   ` Kamil Konieczny
2020-09-11  6:58   ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox