Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp335887pxb; Tue, 3 Nov 2020 00:22:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJw9cAcloME56EOE+G+z+CHVMnMUrYSyM2Ch01amHcnepIMnYCRePMn7tHlsm/8+5dkf/RCt X-Received: by 2002:a17:906:d9dd:: with SMTP id qk29mr9800373ejb.487.1604391720879; Tue, 03 Nov 2020 00:22:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604391720; cv=none; d=google.com; s=arc-20160816; b=dDjjobPmw8v5OuVwH9Kjfk2GByM3/yo9MISX67HKQJdNB+BWhqx4QE9RiuVgvEXyEP EnlEieUKUBWs/GxET1NFRumw4l9eHS2Sx78ON1ZQBCWRJMuSBXJd+6mo/hf3j7/upt5S kpFB+urSuWNpD5WTVrg1mCxQtiGt5HNkbExFg3YGFX+FFyhrIz9/ETtRDKCSaZbvJMtA zKTRJSsIEE68prnCYoaI556aMzqCTx7KLQNpxs7iZiKy8hTshm5oqSA4GPq97rgZLA/c Vy1m0QgEo7oF/L2x+q7U7tw7by4+zR0m0H1cMV9wto7ua83S4oFjKofbx3Fa7w7GYP1g 4hVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=40ALLt/pZ70wgucV4pOyOGWNqLWx3fMvD46wCQDaIBE=; b=iPRIgsd98aPH4YIbfDKVoQlqZvx0DT5ZLML9T5iIZ0lUzrEp3tDtfQJurSLGr4X7+3 qMLVBbxs27+RKuZAL6AF2Pr+8EdoB1o8pCKhwvZrTG7AM/RUjJ3CNdnn+M9x34mcQs1W fsxlcnrvrySbh2XJxwqwg1Qw6WhCTpjz34g9LgUWJKqI45HGXP5LKstd1HHPwBCgWQb/ n2036W6aEBrKXCSMHbkC/SAlIe2XBYcWx5RmO0VKXXkt2VmorqNlMTKXBEkyoXxcLxuJ EPcwVQmi1Hoib5NT42DpYYwVZaWUWgs0zAE04gcfTW0llTj1eKD4dNCYRATrrQlK9iX5 FUCg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d8si12280030edn.471.2020.11.03.00.21.38; Tue, 03 Nov 2020 00:22:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727443AbgKCIUQ (ORCPT + 99 others); Tue, 3 Nov 2020 03:20:16 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:7449 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725988AbgKCIUP (ORCPT ); Tue, 3 Nov 2020 03:20:15 -0500 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4CQN4s2bXGzhg9l; Tue, 3 Nov 2020 16:20:13 +0800 (CST) Received: from [10.174.177.149] (10.174.177.149) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.487.0; Tue, 3 Nov 2020 16:20:07 +0800 Subject: Re: [PATCH v2] iio: adc: rockchip_saradc: fix missing clk_disable_unprepare() on error in rockchip_saradc_resume To: Jonathan Cameron , Lars-Peter Clausen , Peter Meerwald-Stadler , Heiko Stuebner CC: , , , References: <20201103074909.195465-1-miaoqinglang@huawei.com> From: Qinglang Miao Message-ID: <6739f62b-c88e-6792-3237-49787c73c662@huawei.com> Date: Tue, 3 Nov 2020 16:20:07 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20201103074909.195465-1-miaoqinglang@huawei.com> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.177.149] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ?? 2020/11/3 15:49, Qinglang Miao ะด??: > Fix the missing clk_disable_unprepare() of info->pclk > before return from rockchip_saradc_resume in the error > handling case when fails to prepare and enable info->clk. > > Fixes: 44d6f2ef94f9 ("iio: adc: add driver for Rockchip saradc") > Signed-off-by: Qinglang Miao > --- > drivers/iio/adc/rockchip_saradc.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/iio/adc/rockchip_saradc.c b/drivers/iio/adc/rockchip_saradc.c > index 1f3d7d639..5eb566274 100644 > --- a/drivers/iio/adc/rockchip_saradc.c > +++ b/drivers/iio/adc/rockchip_saradc.c > @@ -461,9 +461,10 @@ static int rockchip_saradc_resume(struct device *dev) > return ret; > > ret = clk_prepare_enable(info->clk); > - if (ret) > + if (ret) { > + clk_disable_unprepare(info->pclk); > return ret; > - > + } > return ret; > } > #endif > Hi everyone, I made a careless mistake for adding v2 as subject-prefix, this patch is the base version actually. Sorry about that. Thanks.