From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752757AbcHIP3B (ORCPT ); Tue, 9 Aug 2016 11:29:01 -0400 Received: from 8bytes.org ([81.169.241.247]:43167 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751605AbcHIP26 (ORCPT ); Tue, 9 Aug 2016 11:28:58 -0400 Date: Tue, 9 Aug 2016 17:29:02 +0200 From: Joerg Roedel To: Amitoj Kaur Chawla Cc: kgene@kernel.org, k.kozlowski@samsung.com, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, julia.lawall@lip6.fr Subject: Re: [PATCH] iommu/exynos: Modify error handling Message-ID: <20160809152902.GC29650@8bytes.org> References: <20160801061838.GA17805@amitoj-Inspiron-3542> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160801061838.GA17805@amitoj-Inspiron-3542> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 01, 2016 at 11:48:38AM +0530, Amitoj Kaur Chawla wrote: > of_platform_device_create returns NULL on error so an IS_ERR test is > incorrect here and a NULL check is required. > > The Coccinelle semantic patch used to make this change is as follows: > @@ > expression e; > @@ > > e = of_platform_device_create(...); > if( > - IS_ERR(e) > + !e > ) > { > <+... > return > - PTR_ERR(e) > + -ENODEV > ; > ...+> > } > > Signed-off-by: Amitoj Kaur Chawla > --- > drivers/iommu/exynos-iommu.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Patch didn't apply cleanly against v4.8-rc1, but I fixed it up and it is now in my tree, thanks.