From: weiyj_lk@163.com
To: Marek Szyprowski <m.szyprowski@samsung.com>,
Joerg Roedel <joro@8bytes.org>, Kukjin Kim <kgene@kernel.org>,
Krzysztof Kozlowski <k.kozlowski@samsung.com>,
Dennis Chen <dennis.chen@arm.com>,
Andi Shyti <andi.shyti@samsung.com>
Cc: Wei Yongjun <yongjun_wei@trendmicro.com.cn>,
iommu@lists.linux-foundation.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, stable@vger.kernel.org
Subject: [PATCH -next v3] iommu/exynos: Fix return value check in exynos_iommu_of_setup()
Date: Thu, 7 Jul 2016 12:17:33 +0000 [thread overview]
Message-ID: <1467893853-21403-1-git-send-email-weiyj_lk@163.com> (raw)
In-Reply-To: <1467860372-6940-1-git-send-email-weiyj_lk@163.com>
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.
Fixes: 8ed55c812fa8 ("iommu/exynos: Init from dt-specific callback
instead of initcall")
Cc: stable@vger.kernel.org
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Andi Shyti <andi.shyti@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Dennis Chen <dennis.chen@arm.com>
---
v2 -> v3: added fixes and Reviewed-by.
---
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
WARNING: multiple messages have this Message-ID (diff)
From: weiyj_lk-9Onoh4P/yGk@public.gmane.org
To: Marek Szyprowski
<m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>,
Kukjin Kim <kgene-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Krzysztof Kozlowski
<k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
Dennis Chen <dennis.chen-5wv7dgnIgG8@public.gmane.org>,
Andi Shyti <andi.shyti-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Wei Yongjun
<yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>,
linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: [PATCH -next v3] iommu/exynos: Fix return value check in exynos_iommu_of_setup()
Date: Thu, 7 Jul 2016 12:17:33 +0000 [thread overview]
Message-ID: <1467893853-21403-1-git-send-email-weiyj_lk@163.com> (raw)
In-Reply-To: <1467860372-6940-1-git-send-email-weiyj_lk-9Onoh4P/yGk@public.gmane.org>
From: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
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.
Fixes: 8ed55c812fa8 ("iommu/exynos: Init from dt-specific callback
instead of initcall")
Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Signed-off-by: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
Reviewed-by: Andi Shyti <andi.shyti-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Reviewed-by: Dennis Chen <dennis.chen-5wv7dgnIgG8@public.gmane.org>
---
v2 -> v3: added fixes and Reviewed-by.
---
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
WARNING: multiple messages have this Message-ID (diff)
From: weiyj_lk@163.com (weiyj_lk at 163.com)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH -next v3] iommu/exynos: Fix return value check in exynos_iommu_of_setup()
Date: Thu, 7 Jul 2016 12:17:33 +0000 [thread overview]
Message-ID: <1467893853-21403-1-git-send-email-weiyj_lk@163.com> (raw)
In-Reply-To: <1467860372-6940-1-git-send-email-weiyj_lk@163.com>
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.
Fixes: 8ed55c812fa8 ("iommu/exynos: Init from dt-specific callback
instead of initcall")
Cc: stable at vger.kernel.org
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Andi Shyti <andi.shyti@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Dennis Chen <dennis.chen@arm.com>
---
v2 -> v3: added fixes and Reviewed-by.
---
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
next prev parent reply other threads:[~2016-07-07 12:18 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` weiyj_lk [this message]
2016-07-07 12:17 ` [PATCH -next v3] " weiyj_lk at 163.com
2016-07-07 12:17 ` weiyj_lk-9Onoh4P/yGk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1467893853-21403-1-git-send-email-weiyj_lk@163.com \
--to=weiyj_lk@163.com \
--cc=andi.shyti@samsung.com \
--cc=dennis.chen@arm.com \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=k.kozlowski@samsung.com \
--cc=kgene@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=stable@vger.kernel.org \
--cc=yongjun_wei@trendmicro.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.