From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B1BAC433E2 for ; Tue, 15 Sep 2020 23:48:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4FE6B20809 for ; Tue, 15 Sep 2020 23:48:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600213688; bh=cDT0847aT75pAqdx4y6V4gjKxPC98U4W/+Bq3lZNOWg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=RGpmPVFmVhf7/c3JeVZB1N3dfM8rSGxZnXKyVtiY2iFqE+i6Z1mFMLM8N2OcJFYqz YTr5FWihu5s8MMgTOkDgbhEl5a6MgAWQgFItVzp2V8wuzZSdoB5TTBOs3BvR64HVY8 hzjWFjv+ukRcsBAhLQG0r1u578WvYDCSS/o3wpAM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727320AbgIOXsG (ORCPT ); Tue, 15 Sep 2020 19:48:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:47654 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726184AbgIOOdX (ORCPT ); Tue, 15 Sep 2020 10:33:23 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E1BFE23BE3; Tue, 15 Sep 2020 14:24:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600179887; bh=cDT0847aT75pAqdx4y6V4gjKxPC98U4W/+Bq3lZNOWg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IVN3KCKLxwUbjVGNunektrlfYgBut/aDKRbpx5fN88neHVP58eQUcFB6q+fSlXmw/ fwZrBnmIk+TgbGcFFjTb6TgEWybhkYu3iDmXjZpvdM8y9uahOYXzv01PejaCuBEXdf T2PlhNTiyoRhVhmkA+MFUNFGAI7rWglw14fSNPiU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= , Dmitry Osipenko , Mark Brown , Sasha Levin Subject: [PATCH 5.8 006/177] regulator: remove superfluous lock in regulator_resolve_coupling() Date: Tue, 15 Sep 2020 16:11:17 +0200 Message-Id: <20200915140653.933221961@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915140653.610388773@linuxfoundation.org> References: <20200915140653.610388773@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michał Mirosław [ Upstream commit a577f3456c0a2fac3dee037c483753e6e68f3e49 ] The code modifies rdev, but locks c_rdev instead. Remove the lock as this is held together by regulator_list_mutex taken in the caller. Fixes: f9503385b187 ("regulator: core: Mutually resolve regulators coupling") Signed-off-by: Michał Mirosław Reviewed-by: Dmitry Osipenko Link: https://lore.kernel.org/r/25eb81cefb37a646f3e44eaaf1d8ae8881cfde52.1597195321.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/regulator/core.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 86107d2e1733e..0ba5ca7082afd 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -4891,13 +4891,9 @@ static void regulator_resolve_coupling(struct regulator_dev *rdev) return; } - regulator_lock(c_rdev); - c_desc->coupled_rdevs[i] = c_rdev; c_desc->n_resolved++; - regulator_unlock(c_rdev); - regulator_resolve_coupling(c_rdev); } } -- 2.25.1