From patchwork Fri Dec 22 13:13:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sean Young X-Patchwork-Id: 13503340 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2B204C41535 for ; Fri, 22 Dec 2023 13:13:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=7he4AHlOtGp/Pi30JlrfYPrgIuKeHjoqKydRSi8mAo4=; b=2a9pw2TdTyXgws cwgEpOjVN9uK1Wo69yHnH65O014IxXxUUucRxzCVPmfWfD/F0AIll+9A1sH7jd3PQc+vAHbHs5o1G 53flrEeND8dKA3OnBlLb+NHc2koMdyO6oWCPeGaTjr563XbPbnlbVvyAcvO3SoCoZIWNsKcc9bed6 gyNHZFslf9ugpo8Xzf0lqHEkb8/YCA8+6GQ4uD2rMVLhPusGyXS+1ERJc4mozVyDVvc1raL1i0ZdU rLK86xLu5UXvc/Z2uGj3H/cLmIZBA2z5hx9NgjapQf4Kdv0a9sD/zBtVk4LDLPrD3CnAlIKZdYRcm zNKtgZb0QO0P3nwypeHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rGfLD-0060Y7-37; Fri, 22 Dec 2023 13:13:27 +0000 Received: from gofer.mess.org ([88.97.38.141]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rGfLA-0060Xl-3A; Fri, 22 Dec 2023 13:13:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020; t=1703250800; bh=89OZzKPrOWnbF93jHg/V6IGPFL+n8RBW8Lb7Yb5GP3c=; h=From:To:Cc:Subject:Date:From; b=ZgoNLsVwejtfEEUxarnPO5OUXt7j0DyskEcV3OBW5zXpnMkWOPyY5hfC3SZmwkRNT qf3DpVAzifjqcB1Egh2IhBSW8EKsQr/sM3lPA/RJuZqNKHrIJVlfvIQHQlYrolHDka 27IQ2fu6YQmDpiO8foXWGv4MYJHqBCiKwhWYlwIQcZD80hG8QGEdtw3SPjjsXlBe6V 8M1C8oMziPR6e5yliA11WzXCsai5Zt8BhSTb8z8ZvLeWirhToONNmoS0i2T0p0BjJT ydYXj8KRBgY1tY1msy8bMGaap/g9q1iQQ1CFfWD3Hj8yrYhuzTdkIStEPxMzZ80tMu dO2CmmN5Hc9OA== Received: by gofer.mess.org (Postfix, from userid 501) id 931D21000FD; Fri, 22 Dec 2023 13:13:20 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020; t=1703250799; bh=89OZzKPrOWnbF93jHg/V6IGPFL+n8RBW8Lb7Yb5GP3c=; h=From:To:Cc:Subject:Date:From; b=VafF22rQzDieWkoFdDRCISBS3swdw/eEWiMtQBk2d55rgzy1xMQ6vCFNwLNE4M3zg FPUkpTN06l4BX2Y1unllPtAs77d2tenQMPddF7de0IgSuC6zEk4POkn6Ebp/L1UxSa c2BhgeMpg33wqEyIJNf6ZqOCYxm/BCeW8c9kbpTi0XxYGVmNwCFvp1yCtEnYJDYIr9 AMDez4kc8DzGUVrrZguvRXbogl7GAknGNO/tdzlNtcirGk1LwvqzApKTrGWeo7FjvL tksiuxhX+MT3YPVZrJ5OJVyMYnxL9wOZFeYYbis3uo+Liq598aRUA8waixyQnnpFHq 8fCDDq6oWyP4A== Received: from localhost.localdomain (bigcore.local [IPv6:2a02:8011:d000:212:ca7f:54ff:fe51:14d6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by gofer.mess.org (Postfix) with ESMTPSA id 1E4971000CC; Fri, 22 Dec 2023 13:13:19 +0000 (GMT) From: Sean Young To: Thierry Reding , =?utf-8?q?Uwe_Kleine-K=C3=B6n?= =?utf-8?q?ig?= , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Sean Young Cc: linux-pwm@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] pwm: bcm2835: Remove duplicate call to clk_rate_exclusive_put() Date: Fri, 22 Dec 2023 13:13:11 +0000 Message-ID: <20231222131312.174491-1-sean@mess.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231222_051325_311490_30E6197D X-CRM114-Status: GOOD ( 12.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org devm_add_action_or_reset() already calls the action in the error case. Reported-by: Uwe Kleine-König Closes: https://lore.kernel.org/linux-pwm/fuku3b5ur6y4k4refd3vmeoenzjo6mwe3b3gtel34rhhhtvnsa@w4uktgbqsc3w/ Fixes: fcc760729359 ("pwm: bcm2835: Allow PWM driver to be used in atomic context") Signed-off-by: Sean Young Reviewed-by: Uwe Kleine-König Reviewed-by: Florian Fainelli --- drivers/pwm/pwm-bcm2835.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pwm/pwm-bcm2835.c b/drivers/pwm/pwm-bcm2835.c index 307c0bd5f885..283cf27f25ba 100644 --- a/drivers/pwm/pwm-bcm2835.c +++ b/drivers/pwm/pwm-bcm2835.c @@ -160,10 +160,8 @@ static int bcm2835_pwm_probe(struct platform_device *pdev) ret = devm_add_action_or_reset(&pdev->dev, devm_clk_rate_exclusive_put, pc->clk); - if (ret) { - clk_rate_exclusive_put(pc->clk); + if (ret) return ret; - } pc->rate = clk_get_rate(pc->clk); if (!pc->rate)