Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp570689pxb; Thu, 19 Aug 2021 06:24:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwT4be93NIqeunkxKiNR+mUn9dsJ0wiS2TpWEaw/OlHGaUcR6MKJMfY4ncOGy7tFM2lIEzw X-Received: by 2002:a50:cac7:: with SMTP id f7mr16376801edi.302.1629379450761; Thu, 19 Aug 2021 06:24:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629379450; cv=none; d=google.com; s=arc-20160816; b=YP3U/VqI6oGmLrfuxg72cGWR/+8gnR+879IqIJrKMwsHDPxpqmg7n51kVtWcRlkYIg WCmkq7G0dmG6LPYgmWP9zCrqNqS9j4o0OSPZyadvSVeiVTIkzSW6S4Xg6ewvTB/sj4wZ jPPtQ7whHsftLkhaJbesc6x7Plip81Xq+t3RZJ+MDjbkM3ooIHgVe1tSiFT7PEJYQCCN vZM0kKXQm92TIkRqj/JlJoGbch9BHdzFpc7NWv0+Gi2oEmZafHzYqsALFJVIH3yoAxEM VeGgiQexnAHtfSvZageDb38u+S9mHlrDNXKmgIFCwaCBakQGxUbG6rOXhLdjF50aKYB+ QcSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=mGIj9/XcbS3B1LhoCEIRDyMG9GJkfDJUjikyqsZWQyY=; b=lMlEp3ZBB6GR27OBI0jyfo5ajw001QsiXM5Xs2QR8jNRZQGFNW8NNzlLtFGkkjB294 pNhUURMPjbMPI7CENlLNyvVHs4DJylXeWH7crBpmfphfBJaw8Iolpr1ca50vZcxEJhyD 93csm4Rgi+RT2L2d28Y+pOcTFlTrRMax3aM7Qpm8yLZLlRNb5FZ96qhmhzTmj1tiKcpX L74Y9gK6pkTWpym+OfLKmgSJy+2Q2qdsYQ6gi4Q3lLXz1gPTdz61jBaIgX564AaYSoPc c/fvfOEfnQ6W/b/E1dStBqxgkM6plo7njU8n8CrH7ImmKmsjKh1R6UmXhtnZNvXkAQCj 1pxw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n24si3321416ejl.173.2021.08.19.06.23.37; Thu, 19 Aug 2021 06:24:10 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239861AbhHSNTJ (ORCPT + 99 others); Thu, 19 Aug 2021 09:19:09 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:14279 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239615AbhHSNTH (ORCPT ); Thu, 19 Aug 2021 09:19:07 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.53]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4Gr51S5bD3z7x9H; Thu, 19 Aug 2021 21:18:20 +0800 (CST) Received: from dggpeml500017.china.huawei.com (7.185.36.243) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 19 Aug 2021 21:18:29 +0800 Received: from huawei.com (10.175.103.91) by dggpeml500017.china.huawei.com (7.185.36.243) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 19 Aug 2021 21:18:29 +0800 From: Yang Yingliang To: , CC: , Subject: [PATCH -next] iio: adc: add missing clk_disable_unprepare() in rzg2l_adc_pm_runtime_resume() Date: Thu, 19 Aug 2021 21:24:16 +0800 Message-ID: <20210819132416.175644-1-yangyingliang@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpeml500017.china.huawei.com (7.185.36.243) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add clk_disable_unprepare() on error path in rzg2l_adc_pm_runtime_resume(). Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/iio/adc/rzg2l_adc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/iio/adc/rzg2l_adc.c b/drivers/iio/adc/rzg2l_adc.c index 9996d5eef289..c38f43ea624f 100644 --- a/drivers/iio/adc/rzg2l_adc.c +++ b/drivers/iio/adc/rzg2l_adc.c @@ -570,8 +570,10 @@ static int __maybe_unused rzg2l_adc_pm_runtime_resume(struct device *dev) return ret; ret = clk_prepare_enable(adc->adclk); - if (ret) + if (ret) { + clk_disable_unprepare(adc->pclk); return ret; + } rzg2l_adc_pwr(adc, true); -- 2.25.1