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 02861C43461 for ; Wed, 16 Sep 2020 00:12:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B0ACA20738 for ; Wed, 16 Sep 2020 00:12:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600215170; bh=fq1My1kI9/856/GmoFNh1TNSHBbh7PMEHQhUTnZ8id8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=AbwjlhS+MRNWYxqn1HykzQi7/zJ8uOtnlOUmvK7iMemYNLUbCOCzSshf3ZBHn3rPd NGsJ/OULAVa6o6i66sx1UGvBBSCb1k6K51Nfrx69QVJtt2KcqU3ueOw1wOJnu0iIpG stM0wYxidYlhB3NThaCgKyZWa980fjUDwbNrb35Y= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727284AbgIPAMe (ORCPT ); Tue, 15 Sep 2020 20:12:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:38302 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726935AbgIOO0a (ORCPT ); Tue, 15 Sep 2020 10:26:30 -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 A26E02242F; Tue, 15 Sep 2020 14:19:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600179560; bh=fq1My1kI9/856/GmoFNh1TNSHBbh7PMEHQhUTnZ8id8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i6sDWYvTlX7CSy9jXRZB0NQv8z+o77r4N8oKOvIt8gXxoYhbjf7p+V5DpV/JCKNxy bT6fnoCSt5/plJ2VafQ5gtFCvy/1MxqBEZPIGnq64awBVZXJtFkjRYpbsMc/fB9e3M LcNzUaaGhddapg4l/pTpEc6Bvx2MLSwZQaDT7XGs= 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.4 005/132] regulator: remove superfluous lock in regulator_resolve_coupling() Date: Tue, 15 Sep 2020 16:11:47 +0200 Message-Id: <20200915140644.346474236@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915140644.037604909@linuxfoundation.org> References: <20200915140644.037604909@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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 19826641881bb..c457fa3b8c3e6 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -4868,13 +4868,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