Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9256296pxu; Mon, 28 Dec 2020 10:35:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJwFBhvnchcjRg3WqbzqoPh+3ZexT1/XkMyYcSTc/f0TWINl8H1Wj79h9qo6ZKaTLsi5nNPV X-Received: by 2002:a17:906:c82c:: with SMTP id dd12mr43328657ejb.66.1609180524650; Mon, 28 Dec 2020 10:35:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609180524; cv=none; d=google.com; s=arc-20160816; b=YYE0YFMKtuklecunEGw6r+1qNEkJdk4NVL3EYgF1lliU4auPFqv5p8jbdQU7ZrajZ9 mzLXo6RzGqA1SXDg7DaWVXzmfXg5iTOMcjiXBqcm65qbJz6pwJOogXKaFglNoo48U6Rb E9PUouDZ9lRk0rjlXciSIKaTewGFGOO+o5G/bZ2tytBXXWzbyAC0nqtNajoVXkOid7Rr Uchq/MfV8R0dOB1Ytnz7CofdaH2ADq3j4ROHn+BuUyj3FO8L53mL5S5349UXAzW0nder TrhjAXwlFX7mo6b8chTLhgtx1WXrxUkJtbWNCoQGPDQunxz/EFZHdZpGpgW8GrnB8cVS LsIg== 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=OwvWzaSLGGD2vP7vp2zntchtJLJXLq7Fwb32vOBWwvE=; b=P0mo1+wNYwNYCK+xTkSatNZkwwjfjlk7nfd+MfQPB3o6IPAkLkVrGaLBkxYKbleUcw ZeRR+GsP8lB32MiowKIYYeQVbTqPQLkZXhzqH6swChevIJ9vjmEBll52v44nNsckHHSb 41bZxgS8kaLJlviaav0m/KMrKQdcye4N0DUCRtVvw6Pc1kc5CO7Zrc8VkcMIPXOB6F1R ZyLAaWuDooVMo57FTun5HgaW7vUOnl1mW3/C7xXsVC0ReWjF7XQdajZ5NCXHK60AN65c SBENoexAACQ1P4PruxVO31wOwJ/5tO9k8S96N6Rqsb6Q2OT77aTkbM4TzP9T6QGAmdav QmjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YjAwcDGB; 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 r22si19417369eji.295.2020.12.28.10.35.02; Mon, 28 Dec 2020 10:35:24 -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=YjAwcDGB; 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 S2390548AbgL1NgW (ORCPT + 99 others); Mon, 28 Dec 2020 08:36:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:36366 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391289AbgL1NgE (ORCPT ); Mon, 28 Dec 2020 08:36:04 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 34D892072C; Mon, 28 Dec 2020 13:35:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609162523; bh=jetCLQ5ZMASVFbesRiQ3AkFev++1o0f/gyoA+r9PKCg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YjAwcDGBdSYvauUngilfE16SudjMeszDzf1NOTeQxxkeTqdl/RESCdtr9UY8FaLDO MlKQOv0+Ol0RRll1ZH91m1VCn5ol0EsSUIDXl4Sl8XELdMr1vHuLbd/otPll+T+Bj2 7KlA9yYvnmnxawUJY7zu4bURh5h/bEksGVWZA844= 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.19 329/346] iio: adc: rockchip_saradc: fix missing clk_disable_unprepare() on error in rockchip_saradc_resume Date: Mon, 28 Dec 2020 13:50:48 +0100 Message-Id: <20201228124935.682655007@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124919.745526410@linuxfoundation.org> References: <20201228124919.745526410@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 @@ -383,7 +383,7 @@ static int rockchip_saradc_resume(struct ret = clk_prepare_enable(info->clk); if (ret) - return ret; + clk_disable_unprepare(info->pclk); return ret; }