From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Szyprowski Subject: Re: [patch] iommu/exynos: checking for IS_ERR() instead of NULL Date: Wed, 02 Mar 2016 13:47:35 +0100 Message-ID: <56D6E0E7.9080204@samsung.com> References: <20160302101047.GH5533@mwanda> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-reply-to: <20160302101047.GH5533@mwanda> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Dan Carpenter Cc: Krzysztof Kozlowski , linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Kukjin Kim List-Id: linux-samsung-soc@vger.kernel.org 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 Acked-by: Marek Szyprowski > 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