瀏覽代碼

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 <weiyongjun1@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
weiyongjun \(A\) 7 年之前
父節點
當前提交
235699e2a9
共有 1 個文件被更改,包括 0 次插入3 次删除
  1. 0 3
      drivers/crypto/axis/artpec6_crypto.c

+ 0 - 3
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);