Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2395446lqp; Sun, 24 Mar 2024 17:36:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUfCcNujqOwBui/LiyayOUgyJWdEPXCMdMJSpsEf1zGTjou98zx8UJpPCpDWr0VO3GY2dV86Dfrbo/JqVZZ4vtkqGktzPlIULa7l9xYcA== X-Google-Smtp-Source: AGHT+IH1U4WS+QCOg4dAUR0GHiqB27Ocuz3PqGnN1dPVIQKqYDywATDevDX0n9to15jpICcYyz9y X-Received: by 2002:a19:e01a:0:b0:513:c6ec:fa6c with SMTP id x26-20020a19e01a000000b00513c6ecfa6cmr3602611lfg.48.1711327018027; Sun, 24 Mar 2024 17:36:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711327018; cv=pass; d=google.com; s=arc-20160816; b=dPJjBg7NQ15QsVxU/s25bjLzh7Qd3xkmPr54wptGZk1u81vdfI0xAk/3SYjJHrHbmS 974WKQC67vqADWq4pJKrOPI1746aRLe4yLmqY06sMkHip7YGr6HcTExT/qCyM+drycUK 0E1sCDoaf3bpYE9W6P/eY5Qw2LnKSeiY/1mrJkWnbKDBSKlutMT6i4FL4yCSKBWIHuDi Jurmw0q5o7iDT6THfcYt674u3lKrGRJsfDf/hLkVHzKIyKPdm7pRKKf2uS5hw+LoDND7 UY4CwmjTTnum0Ezykn6G1DwgpUcuEcP7WKYFRDYE2j7/Y6czjFprLQmPjQ0gztZ6YuB0 yshw== ARC-Message-Signature: i=2; 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=HBL1MGRitr4IDpw0pQNb8ksrv7EN9as+gdkG1o8lGKY=; fh=cWpwnLL533+yiV4SuMeA/D6c8GklCBj8+v0VD48dFgI=; b=PPr+vh9J+QTpH5Z529Tkd/BrWgdxvAnumfoU37gSC6cr+5VK5rqTffXwwoN0ouwtWy ektjA1H/UZGrwq7mJ5Ty9FTqoTIp61XKcwwLP6d+q0atFI3IPP4tQ487iWTRjVSnB0pU ulhPYs4DS8TH8HN64QZRTDXdUFOqJ+XadmZeYdiDoKhHERywOFrm+GBymFkbIf8avxh/ RTeBtvwnQU4gpAluVl6X0St2PE44qROquE9wt2jmU5TiCGBES2itX4oQ3B1LyziZ5tkP jGOCQ2VicnHfeS6fL3XVdprbrnLsjNWKuAkT1wpdWhmKNeVTPwTurIKhtxC1Nj/8hXds /hLA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=W9K4zOv2; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113411-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113411-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id q29-20020a50aa9d000000b0056beaa1c108si2007996edc.579.2024.03.24.17.36.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 17:36:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113411-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=W9K4zOv2; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113411-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113411-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 am.mirrors.kernel.org (Postfix) with ESMTPS id A60251F24C9D for ; Mon, 25 Mar 2024 00:30:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 39EB21A69B7; Sun, 24 Mar 2024 22:43:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="W9K4zOv2" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 51F3C1A6997; Sun, 24 Mar 2024 22:43:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320213; cv=none; b=JdK51YeqsGJnGJusTCgzzQj0FGSBWvh952qvX0BrcleiE/BxxMkPVyD1ypGywSVBrKmwurQhc8UvKg1UfQ4KMry4tkT8Ol1KfoiyGQp7O6PRLrVabpz/OLqSkR0lm2bbCgc8iRaOAAE7to8PV1QJB2odQqgkJQvKWYQQwUjcokk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320213; c=relaxed/simple; bh=1L5gyKnUNDWV2C0YYKufGqLKY6PpoYok9dEErj71eac=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ddtvmkwv1l330KTNNLepnKcV7G81EOtoGyCYYMMHwIhvL48qbuBMDXSg9Jq2l1qmvQMkqi0MlCDiQFW5MgDvLw4UVUyLVuY6vuWt6FPPJEEM6OZ7Ryn1avq4XfN4VQKYWJgKLJteJCCkhAF665xXcnplgm8mZmfIiHPhGM9d8NM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=W9K4zOv2; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6DC01C433C7; Sun, 24 Mar 2024 22:43:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320213; bh=1L5gyKnUNDWV2C0YYKufGqLKY6PpoYok9dEErj71eac=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W9K4zOv20eE4YCl1VMdy0ARzY4sWAfZAxX1ZzeEF/7p0uUe+6COzm5IFDtClUs8+G d3HoJ3KcS4MKQ2F0/iRZ6uaIc0+pN+Rd+Byl/psdouuOgqpx74cv5YwfeIz2TU13IG OKU12anOAIz8ClP9YIAuVWIveqjfWzCUx9Jzs8cveMhLyjtt3z6zJVp8/s7o8Lmxfd qfJyDlnXGmgwbFo0C5YgOE1AsLlOt5lUZDqNiNHLoHwYAuOg5i3p2m5rw6I8FTTeYz FCOLRE4ecLamX6qsL69RYsZINBCHI3GzOksm5UVrIRz2epRJMOcJNjNAqRvAE0ME/U kpjVICx6jwWag== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: George Stark , Andy Shevchenko , Lee Jones , Sasha Levin Subject: [PATCH 6.8 520/715] leds: aw2013: Unlock mutex before destroying it Date: Sun, 24 Mar 2024 18:31:39 -0400 Message-ID: <20240324223455.1342824-521-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: George Stark [ Upstream commit 6969d0a2ba1adc9ba6a49b9805f24080896c255c ] In the probe() callback in case of error mutex is destroyed being locked which is not allowed so unlock the mutex before destroying. Fixes: 59ea3c9faf32 ("leds: add aw2013 driver") Signed-off-by: George Stark Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231214173614.2820929-2-gnstark@salutedevices.com Signed-off-by: Lee Jones Signed-off-by: Sasha Levin --- drivers/leds/leds-aw2013.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/leds/leds-aw2013.c b/drivers/leds/leds-aw2013.c index 91f44b23cb113..17235a5e576ae 100644 --- a/drivers/leds/leds-aw2013.c +++ b/drivers/leds/leds-aw2013.c @@ -405,6 +405,7 @@ static int aw2013_probe(struct i2c_client *client) chip->regulators); error: + mutex_unlock(&chip->mutex); mutex_destroy(&chip->mutex); return ret; } -- 2.43.0