Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9169458pxu; Mon, 28 Dec 2020 08:17:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJzv90rj+zWEPNwiODSPtHHKM/4UyMzB8IQcr5mGiSCoJDOvOxHgoo1n8psllQsMf2x/MM9I X-Received: by 2002:a17:906:94d4:: with SMTP id d20mr41882704ejy.475.1609172277063; Mon, 28 Dec 2020 08:17:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609172277; cv=none; d=google.com; s=arc-20160816; b=YF/AbCCY7TAt3LsGsiw6aLl93OGdKgeBdis3rsIXAFA+Gz2Qa6uPrYy9ztAn63u96J 7Gxd5xWG87/Q1aHpV83fZDyXnFVOPhhYbQYH3RC/nvFCwmy0VGIo1CC0uKzXRmYC0ovQ knED70tHNOX74IblCNZDjOPGouJJ6dST6+O8a32u0jETrTRHMvwt3JJmgibUfZY3Egs0 QfKCAEunPMrgUsRmj/Z00TwoJ5Vpk42Jd7w771/TrKLMVcPsOwDvUionNpbYRjwagQQi 0oNLitoJxnw8fGaZxFjdxEChRwWUKoe76c1JBcWLCpYbOZBncHZa7Xypre8aIgnt5s8o ZP2A== 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=bo00R+aT1/ggEsM1PuH7qUWwOxc36HrOc+X2ESChyOg=; b=pH03EvIhlPO7T1h1WaZgQXQAeXBB1YLzC/+VTaXa1hrqkbFGT/XbUCmUA0becFY20j tN5WHtlR2/TVdcAIcm/0VtOP1AXWTQsS2fZ8MpgADp36SyOrl3zFdrLTi301kX8JtOXn jfoxnayTGDpLPrTWc6PnAw1u4OFCqkcmFnNuVZIxmQq7PmnTwPAGU6WuibpDYZxQO80V CB3J1i8O4re02DAso7WoQM0r9Z+BvTjKZswEZ7fmmt8aFnMZJiiz05llyI5rIktvTD6V 5kKG2+ggSV/A6MKNlQam2raltgIG40Djgf0pkqmPJ5OmdKEyMddmCr9vp8aI3yy+Gdh4 rcAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Z5phAPZ2; 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 k3si20276741edr.372.2020.12.28.08.17.34; Mon, 28 Dec 2020 08:17:57 -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=Z5phAPZ2; 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 S2504320AbgL1QP2 (ORCPT + 99 others); Mon, 28 Dec 2020 11:15:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:46634 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731742AbgL1NSX (ORCPT ); Mon, 28 Dec 2020 08:18:23 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 212BC207CF; Mon, 28 Dec 2020 13:18:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161487; bh=lQ+XnkTz1NGcvhlhOZ7UngoAKjw3s+BCoubpAbXoywA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z5phAPZ2nNqBFOF2+A0FXEGuHJ0rcZ8AgfwJPQQ5ylq3XPvQ1L77jmAauv/poMsvp SnmiMLWuCruNRwJJL3xLEuBOSuDBXAraHm7VygH75ZT6GDVhjqmNSX/Wb08HTzML3U yePlIhAIfmNdmoESUf/UI6ywDozsPrB5yAmI3Vso= 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.14 229/242] iio: adc: rockchip_saradc: fix missing clk_disable_unprepare() on error in rockchip_saradc_resume Date: Mon, 28 Dec 2020 13:50:34 +0100 Message-Id: <20201228124915.952387894@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@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 @@ -384,7 +384,7 @@ static int rockchip_saradc_resume(struct ret = clk_prepare_enable(info->clk); if (ret) - return ret; + clk_disable_unprepare(info->pclk); return ret; }