From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754456AbeCGNAA (ORCPT ); Wed, 7 Mar 2018 08:00:00 -0500 Received: from foss.arm.com ([217.140.101.70]:50310 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751257AbeCGM77 (ORCPT ); Wed, 7 Mar 2018 07:59:59 -0500 Subject: Re: [PATCH v7 02/14] iommu/rockchip: Fix error handling in probe To: Jeffy Chen , linux-kernel@vger.kernel.org Cc: jcliang@chromium.org, xxm@rock-chips.com, tfiga@chromium.org, Heiko Stuebner , linux-rockchip@lists.infradead.org, iommu@lists.linux-foundation.org, Joerg Roedel , linux-arm-kernel@lists.infradead.org References: <20180306030252.3197-1-jeffy.chen@rock-chips.com> <20180306030252.3197-3-jeffy.chen@rock-chips.com> From: Robin Murphy Message-ID: Date: Wed, 7 Mar 2018 12:59:55 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180306030252.3197-3-jeffy.chen@rock-chips.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/03/18 03:02, Jeffy Chen wrote: > Add missing iommu_device_sysfs_remove in error path. Acked-by: Robin Murphy (strictly you don't need to introduce the additional return, but it's only a couple of lines and definitely not worth respinning just for that) > Signed-off-by: Jeffy Chen > Reviewed-by: Tomasz Figa > --- > > Changes in v7: None > Changes in v6: None > Changes in v5: None > Changes in v4: None > Changes in v3: None > Changes in v2: None > > drivers/iommu/rockchip-iommu.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c > index 16cd8780c289..c2ef3cbd4401 100644 > --- a/drivers/iommu/rockchip-iommu.c > +++ b/drivers/iommu/rockchip-iommu.c > @@ -1193,8 +1193,12 @@ static int rk_iommu_probe(struct platform_device *pdev) > > iommu_device_set_ops(&iommu->iommu, &rk_iommu_ops); > err = iommu_device_register(&iommu->iommu); > + if (err) { > + iommu_device_sysfs_remove(&iommu->iommu); > + return err; > + } > > - return err; > + return 0; > } > > static const struct of_device_id rk_iommu_dt_ids[] = { > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robin Murphy Subject: Re: [PATCH v7 02/14] iommu/rockchip: Fix error handling in probe Date: Wed, 7 Mar 2018 12:59:55 +0000 Message-ID: References: <20180306030252.3197-1-jeffy.chen@rock-chips.com> <20180306030252.3197-3-jeffy.chen@rock-chips.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20180306030252.3197-3-jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org> Content-Language: en-GB 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: Jeffy Chen , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: Heiko Stuebner , jcliang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: linux-rockchip.vger.kernel.org On 06/03/18 03:02, Jeffy Chen wrote: > Add missing iommu_device_sysfs_remove in error path. Acked-by: Robin Murphy (strictly you don't need to introduce the additional return, but it's only a couple of lines and definitely not worth respinning just for that) > Signed-off-by: Jeffy Chen > Reviewed-by: Tomasz Figa > --- > > Changes in v7: None > Changes in v6: None > Changes in v5: None > Changes in v4: None > Changes in v3: None > Changes in v2: None > > drivers/iommu/rockchip-iommu.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c > index 16cd8780c289..c2ef3cbd4401 100644 > --- a/drivers/iommu/rockchip-iommu.c > +++ b/drivers/iommu/rockchip-iommu.c > @@ -1193,8 +1193,12 @@ static int rk_iommu_probe(struct platform_device *pdev) > > iommu_device_set_ops(&iommu->iommu, &rk_iommu_ops); > err = iommu_device_register(&iommu->iommu); > + if (err) { > + iommu_device_sysfs_remove(&iommu->iommu); > + return err; > + } > > - return err; > + return 0; > } > > static const struct of_device_id rk_iommu_dt_ids[] = { > From mboxrd@z Thu Jan 1 00:00:00 1970 From: robin.murphy@arm.com (Robin Murphy) Date: Wed, 7 Mar 2018 12:59:55 +0000 Subject: [PATCH v7 02/14] iommu/rockchip: Fix error handling in probe In-Reply-To: <20180306030252.3197-3-jeffy.chen@rock-chips.com> References: <20180306030252.3197-1-jeffy.chen@rock-chips.com> <20180306030252.3197-3-jeffy.chen@rock-chips.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 06/03/18 03:02, Jeffy Chen wrote: > Add missing iommu_device_sysfs_remove in error path. Acked-by: Robin Murphy (strictly you don't need to introduce the additional return, but it's only a couple of lines and definitely not worth respinning just for that) > Signed-off-by: Jeffy Chen > Reviewed-by: Tomasz Figa > --- > > Changes in v7: None > Changes in v6: None > Changes in v5: None > Changes in v4: None > Changes in v3: None > Changes in v2: None > > drivers/iommu/rockchip-iommu.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c > index 16cd8780c289..c2ef3cbd4401 100644 > --- a/drivers/iommu/rockchip-iommu.c > +++ b/drivers/iommu/rockchip-iommu.c > @@ -1193,8 +1193,12 @@ static int rk_iommu_probe(struct platform_device *pdev) > > iommu_device_set_ops(&iommu->iommu, &rk_iommu_ops); > err = iommu_device_register(&iommu->iommu); > + if (err) { > + iommu_device_sysfs_remove(&iommu->iommu); > + return err; > + } > > - return err; > + return 0; > } > > static const struct of_device_id rk_iommu_dt_ids[] = { >