All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] iommu/exynos: Fix return value check in exynos_iommu_of_setup()
@ 2016-07-06 12:15 ` weiyj_lk at 163.com
  0 siblings, 0 replies; 23+ messages in thread
From: weiyj_lk @ 2016-07-06 12:15 UTC (permalink / raw)
  To: Marek Szyprowski, Joerg Roedel, Kukjin Kim, Krzysztof Kozlowski
  Cc: Wei Yongjun, iommu, linux-arm-kernel, linux-samsung-soc

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

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 <yongjun_wei@trendmicro.com.cn>
---
 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 -ENOMEM;
 
 	/*
 	 * use the first registered sysmmu device for performing

^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2016-07-18  7:34 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-06 12:15 [PATCH -next] iommu/exynos: Fix return value check in exynos_iommu_of_setup() weiyj_lk
2016-07-06 12:15 ` weiyj_lk at 163.com
2016-07-06 12:47 ` Dennis Chen
2016-07-06 12:47   ` Dennis Chen
2016-07-06 13:09 ` Krzysztof Kozlowski
2016-07-06 13:09   ` Krzysztof Kozlowski
2016-07-07  2:34   ` Andi Shyti
2016-07-07  2:34     ` Andi Shyti
2016-07-07  2:50     ` Wei Yongjun
2016-07-07  2:50       ` Wei Yongjun
2016-07-18  7:34   ` Marek Szyprowski
2016-07-18  7:34     ` Marek Szyprowski
     [not found] ` <1467807354-26503-1-git-send-email-weiyj_lk-9Onoh4P/yGk@public.gmane.org>
2016-07-07  2:59   ` [PATCH -next v2] " weiyj_lk-9Onoh4P/yGk
2016-07-07  2:59     ` weiyj_lk at 163.com
2016-07-07  4:25     ` Andi Shyti
2016-07-07  4:25       ` Andi Shyti
     [not found]     ` <1467860372-6940-1-git-send-email-weiyj_lk-9Onoh4P/yGk@public.gmane.org>
2016-07-07  9:43       ` Krzysztof Kozlowski
2016-07-07  9:43         ` Krzysztof Kozlowski
2016-07-07 12:09         ` Wei Yongjun
2016-07-07 12:09           ` Wei Yongjun
2016-07-07 12:17       ` [PATCH -next v3] " weiyj_lk-9Onoh4P/yGk
2016-07-07 12:17         ` weiyj_lk
2016-07-07 12:17         ` weiyj_lk at 163.com

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.