From 235699e2a99fe40c11a377942e60bad11ce4046e Mon Sep 17 00:00:00 2001 From: "weiyongjun \\(A\\)" Date: Wed, 17 Jan 2018 11:26:47 +0000 Subject: [PATCH] crypto: axis - remove unnecessary platform_get_resource() error check devm_ioremap_resource() already checks if the resource is NULL, so remove the unnecessary platform_get_resource() error check. Signed-off-by: Wei Yongjun Signed-off-by: Herbert Xu --- drivers/crypto/axis/artpec6_crypto.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/crypto/axis/artpec6_crypto.c b/drivers/crypto/axis/artpec6_crypto.c index 22df6b55e172..0fb8bbf41a8d 100644 --- a/drivers/crypto/axis/artpec6_crypto.c +++ b/drivers/crypto/axis/artpec6_crypto.c @@ -3042,9 +3042,6 @@ static int artpec6_crypto_probe(struct platform_device *pdev) variant = (enum artpec6_crypto_variant)match->data; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -ENODEV; - base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(base)) return PTR_ERR(base);