From nobody Fri Oct 17 10:17:07 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5914C433FE for ; Wed, 19 Oct 2022 13:48:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233622AbiJSNs3 (ORCPT ); Wed, 19 Oct 2022 09:48:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233204AbiJSNq6 (ORCPT ); Wed, 19 Oct 2022 09:46:58 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 553C450514; Wed, 19 Oct 2022 06:32:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 84E4DCE2100; Wed, 19 Oct 2022 08:50:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83368C433D6; Wed, 19 Oct 2022 08:50:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169415; bh=oyGyxWJUXiy5R6FcVcV6T7cfpWGfVqEQbstwhBlVSqA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RTv9l4x126g/Q0yfxj8jONoZe4S3tFs2/qwehXhZx0RpaEs0f9PTxsgI56szSbaPo aosxKolWjsF9uI+xL7+4D5MxXzNmNw+QIUm1xUdOHiKQ1h5EL5BMbW1CKCqg0po750 eCsrHbIfvzCPLmOnmBhAqa5gdWuVhceKf2LApmCg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pavel Machek , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Wolfram Sang , Sasha Levin Subject: [PATCH 6.0 234/862] leds: lm3601x: Dont use mutex after it was destroyed Date: Wed, 19 Oct 2022 10:25:21 +0200 Message-Id: <20221019083300.374919732@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Uwe Kleine-K=C3=B6nig [ Upstream commit 32f7eed0c763a9b89f6b357ec54b48398fc7b99e ] The mutex might still be in use until the devm cleanup callback devm_led_classdev_flash_release() is called. This only happens some time after lm3601x_remove() completed. Fixes: e63a744871a3 ("leds: lm3601x: Convert class registration to device m= anaged") Acked-by: Pavel Machek Signed-off-by: Uwe Kleine-K=C3=B6nig Signed-off-by: Wolfram Sang Signed-off-by: Sasha Levin --- drivers/leds/flash/leds-lm3601x.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/leds/flash/leds-lm3601x.c b/drivers/leds/flash/leds-lm= 3601x.c index d0e1d4814042..3d1272748201 100644 --- a/drivers/leds/flash/leds-lm3601x.c +++ b/drivers/leds/flash/leds-lm3601x.c @@ -444,8 +444,6 @@ static int lm3601x_remove(struct i2c_client *client) { struct lm3601x_led *led =3D i2c_get_clientdata(client); =20 - mutex_destroy(&led->lock); - return regmap_update_bits(led->regmap, LM3601X_ENABLE_REG, LM3601X_ENABLE_MASK, LM3601X_MODE_STANDBY); --=20 2.35.1