Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp873794pxb; Wed, 3 Mar 2021 19:15:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/2uoFmns/n9Eb+YVucDFvY+WK7mBbOzRu537a+X8xNLqlScvRhajxAbk+qlnyXBX74nTP X-Received: by 2002:a05:6402:32d:: with SMTP id q13mr2130362edw.17.1614827731302; Wed, 03 Mar 2021 19:15:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614827731; cv=none; d=google.com; s=arc-20160816; b=OR44fhXC+cdB22i6dFOjKSYfmwS861eRkh5WRgkeNn7lQmyp3Y0hTD6T9WWbqq0m/W YnCt5giw6QQSOyOOWGGX2WiFNafvgJBi5Vd3FNVxEaGREMR1+jXbCGxbTThoy6TK0kuT HYZXEetV2lWEcTCvTBX481f6mEH6Ur/ak4NaSp7IW8bZE+enGzRd1Voda0zDFkknXMce sRZK/Y1/VYtxbyJYw8CCCwQ0WkHCv5g8XTlhQoVJvQA2dmFsrRzRFW7LeX0ZTrhNOHY6 kFWSp24y6o0c80LLo1SV+ufHbrY0ZkcxrW4hDqKCmfAcnQSxD5qoEPmvwz48ZV9lDbjG ukeA== 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=eSzf7a6DtgxpK7KCXnvF6XXGt9ZmX1l5Zfvr9b8yIG4=; b=UgrPxZhcLRuv2FE+wJesBTV/w72nXXdSSEF0ymHFhBgLQVYNKbxHY6OClVrvi+853Y +98cPatriITfuDnLjx0GvoDF2jPTDErYb54n6OpxjNHRlv/txgFqPTZjwJclA5KWiSBt enQs//ksZN9ph3NHaqWc2FTVJ/y4Q27fAlQOCqcFpIECbzuzrrUONgtne8qaNwscXPWi tl0zLRj7bNO/ZXkS52xkyeCuO/vqsSGCqyCN+TOfGnYai9z5hX+if+0k63yVpwUh1evD wNLDh43mcL+vuhOiDS47M5xdFViYXkADIhGVVfFsvqVJTUSXw6yaGWy2VDR+0v3inm/P mhWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YakoCxzP; 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 h14si16117910ejt.198.2021.03.03.19.15.09; Wed, 03 Mar 2021 19:15:31 -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=YakoCxzP; 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 S1379190AbhCBB0t (ORCPT + 99 others); Mon, 1 Mar 2021 20:26:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:39804 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241093AbhCATMm (ORCPT ); Mon, 1 Mar 2021 14:12:42 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4A903651FD; Mon, 1 Mar 2021 17:21:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614619290; bh=ueUwLAhXUFGnUo1tdAPzQZC5Got3knmWVoR+qMM7in4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YakoCxzPEBfdd6ppovDjFN3J99TneUdw9xLaF/5XGophS+4KKnnuIAgvVOqUBJera nDG+c00tyrWtS4d1QKNjDq+ZDNM/gdbPCXfdczt2OIfi5g62ONDgOA2t8/x0ufifkl EtiSl3Xj+KTcnSpFdKzgyC7pfdfWiOAISCxTRVVI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Simon South , Thierry Reding , Sasha Levin Subject: [PATCH 5.10 402/663] pwm: rockchip: rockchip_pwm_probe(): Remove superfluous clk_unprepare() Date: Mon, 1 Mar 2021 17:10:50 +0100 Message-Id: <20210301161201.759464262@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161141.760350206@linuxfoundation.org> References: <20210301161141.760350206@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: Simon South [ Upstream commit d5d8d675865ccddfe4da26c85f22c55cec663bf2 ] If rockchip_pwm_probe() fails to register a PWM device it calls clk_unprepare() for the device's PWM clock, without having first disabled the clock and before jumping to an error handler that also unprepares it. This is likely to produce warnings from the kernel about the clock being unprepared when it is still enabled, and then being unprepared when it has already been unprepared. Prevent these warnings by removing this unnecessary call to clk_unprepare(). Fixes: 48cf973cae33 ("pwm: rockchip: Avoid glitches on already running PWMs") Signed-off-by: Simon South Signed-off-by: Thierry Reding Signed-off-by: Sasha Levin --- drivers/pwm/pwm-rockchip.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pwm/pwm-rockchip.c b/drivers/pwm/pwm-rockchip.c index 7b9cdefb3daa3..ede027fbf2bb4 100644 --- a/drivers/pwm/pwm-rockchip.c +++ b/drivers/pwm/pwm-rockchip.c @@ -353,7 +353,6 @@ static int rockchip_pwm_probe(struct platform_device *pdev) ret = pwmchip_add(&pc->chip); if (ret < 0) { - clk_unprepare(pc->clk); dev_err(&pdev->dev, "pwmchip_add() failed: %d\n", ret); goto err_pclk; } -- 2.27.0