Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp786225rdb; Fri, 22 Dec 2023 05:13:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IGV9TYJIwfKC/+0VMNDXswq+f1JYHMnsZAZs7ydFAyo0bGhGHTq5IsO8ZQeCgxzd+TxovTC X-Received: by 2002:a05:6358:71a:b0:172:9d7c:f9e6 with SMTP id e26-20020a056358071a00b001729d7cf9e6mr1182800rwj.9.1703250813292; Fri, 22 Dec 2023 05:13:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703250813; cv=none; d=google.com; s=arc-20160816; b=MuxcWpVZmREMwOABVcBwCdeogNU5+y8LM2HiOoEBVZX8FNwPkktLtBlvUdHwDE01j1 nm1N27hMGj8eiZ4RFMsAwl/xfINsgS93366JxWb+QYFGIRrNJu7YQ5VcqUNcHSwJO50H ByjGJXTo5SAuO3STqm+Re6e6UARU7q6L2RBPjV5oC5owo+hxqrufBf2krVujHa3x99u5 G3XJV+YZ3nspRTnXtQaAWlQ2VWVrr2X5Ee+s9uZQWpu2WybFZbj3ybAAGY/IJ/oLzhYJ cO79UIHtAUcv0uOdHLiFX7/zmtvKSanMcDFSpYf5puSLCUpS8MUlHCyCwrYyY+ZaFdgz ovhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature:dkim-signature; bh=MuEJ6iU82J2e9BTQrUL+XVmrKiFlzoOhCgPeRlGM1b8=; fh=3LiBBPKrFMvcy23GxFtdXuaQLMuzEGHzrLGvJ9Dxch8=; b=zPSQU6aVff6sRlnA5GC3UdeH/1+DFUeeHuwU4rUsu7jiPIF3zXONQJ5bsuaU82AAQS r9R0plVWO9DWfLocJEFhszrEeoQ88Y5LpoaPuhfs/sKqpMM9z5i1kA1x4yCgshsGNsKD cSV6x6MEb1kep9VRKLh1wTMYWqN/0+ZzvqfPOV1q4dXffksLX1Y+azOwwzUrMrtONLPF /xwaNxXix3M74tTfGljpiESHjZ/mO4z7OCTH5pFY2/bkHmohgkLrZn7Vcl+ig21tcvkj gMlMncPG8PFYxf8+ifBk94O/ZpNOGREGAFJcToocEhCZAlU6zeSko6l+iVFsMtHgl03n qgLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mess.org header.s=2020 header.b=ZgoNLsVw; dkim=pass header.i=@mess.org header.s=2020 header.b=VafF22rQ; spf=pass (google.com: domain of linux-kernel+bounces-9743-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9743-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mess.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id b5-20020a17090a12c500b0028b3b39a1ebsi3266780pjg.125.2023.12.22.05.13.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 05:13:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-9743-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@mess.org header.s=2020 header.b=ZgoNLsVw; dkim=pass header.i=@mess.org header.s=2020 header.b=VafF22rQ; spf=pass (google.com: domain of linux-kernel+bounces-9743-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9743-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mess.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 9020F2844CD for ; Fri, 22 Dec 2023 13:13:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 68483199B3; Fri, 22 Dec 2023 13:13:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b="ZgoNLsVw"; dkim=pass (2048-bit key) header.d=mess.org header.i=@mess.org header.b="VafF22rQ" X-Original-To: linux-kernel@vger.kernel.org Received: from gofer.mess.org (gofer.mess.org [88.97.38.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B162E18E06; Fri, 22 Dec 2023 13:13:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mess.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mess.org 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 8C70A1000CC; Fri, 22 Dec 2023 13:13:20 +0000 (GMT) X-Spam-Level: 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=20Kleine-K=C3=B6nig?= , 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- 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) -- 2.43.0