Received: by 10.223.185.116 with SMTP id b49csp5010447wrg; Wed, 7 Mar 2018 05:02:59 -0800 (PST) X-Google-Smtp-Source: AG47ELuMg9mvRG/SIlrw4aze4zqYIKbxckssafIeTejHRTw92e2xogFQmlkVXDNSEpCTihwflvEg X-Received: by 2002:a17:902:b416:: with SMTP id x22-v6mr20063869plr.279.1520427779195; Wed, 07 Mar 2018 05:02:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520427779; cv=none; d=google.com; s=arc-20160816; b=rxsTIe8j0RvJ9p17rpd0QLMuunuQrblj0Y/bockYXwdbOEAPPHHbnXntJx6KTXwixi /++rqsjjPmScimr4dTDLkg1eLh7jKnoxQh4ULCNDzJd/pALB2f0rxJijpqTrMiLTJw1b r8GBB0O9FocSGLoYnEVgsuqG0huzF550dljZa9zLfa0IqtQrpW8oUsBfE96lHyKA6dou wfRGSK9341/C/3p+U+RUXcGarr6A/8JJO0Cy+z580+tolc490EsqwzUb9NOgREmyBWi8 mfWIQCaAOMX7364h6dH2PthHgs8CbgiCi5QX7N26nX6MPsdXl84a+/jr2M3qv3DugYXB cHiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=4fD7diKamXDSLnsWpEzXU4kd4ZVUsDeIcDzzwXMpu5A=; b=cmXQxFWefz0OjD7yjXcOomgSoZITUFmutfCk2DPHKMeK9hL4EkpMO4j2RnQZ5e9aSm z+0CsmvPDfkpKC0t1ZazNMlS9lise0gViBWROhVk16KbT0uf9Wn6BhEqhZso6IRinEgj 6TNnMRze7r/cWZKwfOolYwBZaSQghV0G5Oei3jMq+ki0Uh3GK4CvvOQdS/sqsKiXDqA6 wMMiCAXowrR/qCYjWudSvjHEIYt6WuNve6zldgXwL8jWF6O9o05JqzRw0yZSJP4htN41 uIBvzffXCCYwNz3b3k6KyjMYvOthVBgJTQEYT0X3fFfO7gitZFvIyVVE35L/wa54qPvz 2ztg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u15-v6si13134176plk.516.2018.03.07.05.02.43; Wed, 07 Mar 2018 05:02:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754453AbeCGNAA (ORCPT + 99 others); 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 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id ED9F81435; Wed, 7 Mar 2018 04:59:58 -0800 (PST) Received: from [10.1.210.88] (e110467-lin.cambridge.arm.com [10.1.210.88]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 43C163F487; Wed, 7 Mar 2018 04:59:57 -0800 (PST) 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 Precedence: bulk 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[] = { >