Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9179863pxu; Mon, 28 Dec 2020 08:33:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJwIhsaDyBSzwOPfVIGus9iRQhPS0K7IvQxGaItjgmtKMb8tR0Lw+0piC42lfFhKXLkGFqH9 X-Received: by 2002:a17:906:aec6:: with SMTP id me6mr41966073ejb.542.1609173231040; Mon, 28 Dec 2020 08:33:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609173231; cv=none; d=google.com; s=arc-20160816; b=WWxYpqs1YFiZFhKZUOcfZM5vrkMMm5lyV3vYhzNygfF0zjbSB9s0WzprCfZbsHsbgZ +MDy/foMCeLZog0IfYZn/mbNm7BrEqjj3WZeUtkESMEU1iMoX608lh5me/yIjleTGpKs Nq6+TGHIqvhSn4G3baB0yNOq86bFh7Vun6aCNlbGjC+o+q/NX6Vdxmbk4U7yJOBoY0DY bwhLaAI/HaxWMCauXeis7quEDvQDBQgOWYHnMufOmdWAVuvnPRZuIaxsFuQwn8NwqxG0 4XG0ct23v1C4iOWdcxD8IdY/MK+wXb3xoMS0hiCwfKhAB99MpjnQ/2RbuJvuFY+quNbp McKA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=O+kUPSbQ4NT73FMerqljv/OEt+DdNyy03V1EFmjSsIg=; b=x21MHYz0v4htkXi3kTusvYM5nBg5p2iWu0BNKcR3ORrRckhkCBqSs9z7+LKmgu5i2n ZBHJO0J/4A1QmRyfQzi4B8ZG64YhPrNr2E8xSZAgBHlYkTqLO2uXpgJDwZfF9HRH6CxK DW+zgDJq08MhbENOxBrIQvy1aWG0wjUWMaBSLEtk2SpQK/ifRCRoo1x473ssU+i1+okd XvEEehy5qX0Gg2qNEAofbV1+HMVFEwxrJ3tSiNQDHHah0S86btvZflLI8uUGG0kB8Xf6 bk+kBmyReXz197tXFJWTPVd2biS8vrwTB84AGKVwu5epqA8WhXfDmx/bzV753xzV2X2T rd2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OBYXSgP6; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jg13si16836482ejc.352.2020.12.28.08.33.27; Mon, 28 Dec 2020 08:33:51 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OBYXSgP6; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2633633AbgL1Q3o (ORCPT + 99 others); Mon, 28 Dec 2020 11:29:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:34882 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729218AbgL1NHJ (ORCPT ); Mon, 28 Dec 2020 08:07:09 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 863A022582; Mon, 28 Dec 2020 13:06:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609160789; bh=s0SWNNKf0DpnWFJWvV5sK+f8n28NEy6C+dlELFmW8vQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OBYXSgP64wbGobqTzoKVmoUOqhv2zd7Ay2tfrZDWzD2D8UAtgYnalEJhoM3wfjyvg zwEt3q69oAvryHIkzE5/PYKyaiC8kOlHSY2/iNnyvY6pjz6japmK9P19qgbdKq7wGW QyeZgzmLGDq7w0P5oWNMVYFJhNSLayvU7KKt2ae8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Robin Murphy , Qinglang Miao , Stable@vger.kernel.org, Jonathan Cameron Subject: [PATCH 4.9 171/175] iio: adc: rockchip_saradc: fix missing clk_disable_unprepare() on error in rockchip_saradc_resume Date: Mon, 28 Dec 2020 13:50:24 +0100 Message-Id: <20201228124901.511336983@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124853.216621466@linuxfoundation.org> References: <20201228124853.216621466@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Qinglang Miao commit 560c6b914c6ec7d9d9a69fddbb5bf3bf71433e8b upstream. 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. Suggested-by: Robin Murphy Fixes: 44d6f2ef94f9 ("iio: adc: add driver for Rockchip saradc") Signed-off-by: Qinglang Miao Cc: Link: https://lore.kernel.org/r/20201103120743.110662-1-miaoqinglang@huawei.com Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/adc/rockchip_saradc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/iio/adc/rockchip_saradc.c +++ b/drivers/iio/adc/rockchip_saradc.c @@ -378,7 +378,7 @@ static int rockchip_saradc_resume(struct ret = clk_prepare_enable(info->clk); if (ret) - return ret; + clk_disable_unprepare(info->pclk); return ret; }