From: Dan Carpenter <dan.carpenter@oracle.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Joerg Roedel <joro@8bytes.org>, Kukjin Kim <kgene@kernel.org>,
Krzysztof Kozlowski <k.kozlowski@samsung.com>,
iommu@lists.linux-foundation.org,
linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [patch] iommu/exynos: checking for IS_ERR() instead of NULL
Date: Wed, 2 Mar 2016 13:10:47 +0300 [thread overview]
Message-ID: <20160302101047.GH5533@mwanda> (raw)
of_platform_device_create() returns NULL on error, it never returns
error pointers.
Fixes: 8ed55c812fa8 ('iommu/exynos: Init from dt-specific callback instead of initcall')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
index b066504..cb57bda 100644
--- a/drivers/iommu/exynos-iommu.c
+++ b/drivers/iommu/exynos-iommu.c
@@ -1347,8 +1347,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
next reply other threads:[~2016-03-02 10:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-02 10:10 Dan Carpenter [this message]
2016-03-02 12:47 ` [patch] iommu/exynos: checking for IS_ERR() instead of NULL Marek Szyprowski
2016-03-02 14:53 ` Joerg Roedel
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=20160302101047.GH5533@mwanda \
--to=dan.carpenter@oracle.com \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=k.kozlowski@samsung.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kgene@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox