From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Dan Carpenter <dan.carpenter@oracle.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: Re: [patch] iommu/exynos: checking for IS_ERR() instead of NULL
Date: Wed, 02 Mar 2016 13:47:35 +0100 [thread overview]
Message-ID: <56D6E0E7.9080204@samsung.com> (raw)
In-Reply-To: <20160302101047.GH5533@mwanda>
Hello,
On 2016-03-02 11:10, Dan Carpenter wrote:
> 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>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.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
>
>
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
next prev parent reply other threads:[~2016-03-02 12:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-02 10:10 [patch] iommu/exynos: checking for IS_ERR() instead of NULL Dan Carpenter
2016-03-02 12:47 ` Marek Szyprowski [this message]
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=56D6E0E7.9080204@samsung.com \
--to=m.szyprowski@samsung.com \
--cc=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 \
/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