Thread (11 messages) flat view 11 messages, 5 authors, 2016-07-18
STALE3716d REVIEWED: 1 (0M)

1 review trailer.

[PATCH -next v2] iommu/exynos: Fix return value check in exynos_iommu_of_setup()

From: Andi Shyti <hidden>
Date: 2016-07-07 04:25:08
Also in: linux-iommu, linux-samsung-soc

Hi Wei,

On Thu, Jul 07, 2016 at 02:59:32AM +0000, weiyj_lk at 163.com wrote:
From: Wei Yongjun <redacted>

In case of error, the function of_platform_device_create() returns
NULL pointer not ERR_PTR(). The IS_ERR() test in the return value
check should be replaced with NULL test.

Signed-off-by: Wei Yongjun <redacted>
Reviewed-by: Andi Shyti <redacted>

Thanks,
Andi
quoted hunk ↗ jump to hunk
---
v1 -> v2: chenge the error code to -ENODEV
---
 drivers/iommu/exynos-iommu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
index 33dcc29..9b23059 100644
--- a/drivers/iommu/exynos-iommu.c
+++ b/drivers/iommu/exynos-iommu.c
@@ -1345,8 +1345,8 @@ static int __init exynos_iommu_of_setup(struct device_node *np)
 		exynos_iommu_init();
 
 	pdev = of_platform_device_create(np, NULL, platform_bus_type.dev_root);
-	if (IS_ERR(pdev))
-		return PTR_ERR(pdev);
+	if (!pdev)
+		return -ENODEV;
 
 	/*
 	 * use the first registered sysmmu device for performing


--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help