diff mbox

[-next] crypto: axis - remove unnecessary platform_get_resource() error check

Message ID 1516188407-145156-1-git-send-email-weiyongjun1@huawei.com (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show

Commit Message

Wei Yongjun Jan. 17, 2018, 11:26 a.m. UTC
devm_ioremap_resource() already checks if the resource is NULL, so
remove the unnecessary platform_get_resource() error check.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/crypto/axis/artpec6_crypto.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Herbert Xu Jan. 26, 2018, 3:45 p.m. UTC | #1
On Wed, Jan 17, 2018 at 11:26:47AM +0000, Wei Yongjun wrote:
> devm_ioremap_resource() already checks if the resource is NULL, so
> remove the unnecessary platform_get_resource() error check.
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Patch applied.  Thanks.
diff mbox

Patch

diff --git a/drivers/crypto/axis/artpec6_crypto.c b/drivers/crypto/axis/artpec6_crypto.c
index 0f9754e..02e8739 100644
--- a/drivers/crypto/axis/artpec6_crypto.c
+++ b/drivers/crypto/axis/artpec6_crypto.c
@@ -3041,9 +3041,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);