[PATCH] crypto: amlogic - Remove redundant assignment and error messages

Tang Bin posted 1 patch 2 months, 2 weeks ago
drivers/crypto/amlogic/amlogic-gxl-core.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
[PATCH] crypto: amlogic - Remove redundant assignment and error messages
Posted by Tang Bin 2 months, 2 weeks ago
In the function meson_crypto_probe, devm_platform_ioremap_resource()
have already contains error message, so remove the
redundant assignment and error messages.

Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
 drivers/crypto/amlogic/amlogic-gxl-core.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/crypto/amlogic/amlogic-gxl-core.c b/drivers/crypto/amlogic/amlogic-gxl-core.c
index f54ab0d0b..6fe248620 100644
--- a/drivers/crypto/amlogic/amlogic-gxl-core.c
+++ b/drivers/crypto/amlogic/amlogic-gxl-core.c
@@ -240,11 +240,9 @@ static int meson_crypto_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, mc);
 
 	mc->base = devm_platform_ioremap_resource(pdev, 0);
-	if (IS_ERR(mc->base)) {
-		err = PTR_ERR(mc->base);
-		dev_err(&pdev->dev, "Cannot request MMIO err=%d\n", err);
-		return err;
-	}
+	if (IS_ERR(mc->base))
+		return PTR_ERR(mc->base);
+
 	mc->busclk = devm_clk_get(&pdev->dev, "blkmv");
 	if (IS_ERR(mc->busclk)) {
 		err = PTR_ERR(mc->busclk);
-- 
2.33.0
Re: [PATCH] crypto: amlogic - Remove redundant assignment and error messages
Posted by Herbert Xu 1 month, 3 weeks ago
Tang Bin <tangbin@cmss.chinamobile.com> wrote:
> In the function meson_crypto_probe, devm_platform_ioremap_resource()
> have already contains error message, so remove the
> redundant assignment and error messages.
> 
> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
> ---
> drivers/crypto/amlogic/amlogic-gxl-core.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 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