Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp828166rdb; Wed, 6 Dec 2023 00:36:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IGJQzwUwxvCi86UGbF8AaD6jwlDHPOnB/7xCHXLp2wz5Zd91jTjP+RU7kVCHRwy5azDARt5 X-Received: by 2002:a05:6808:20a4:b0:3a9:9bb6:811 with SMTP id s36-20020a05680820a400b003a99bb60811mr731500oiw.57.1701851810463; Wed, 06 Dec 2023 00:36:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701851810; cv=none; d=google.com; s=arc-20160816; b=s/j8J91UyuMinpIe27/ddLyu20sTaL3d53b8uuCiwENR93/KdjQZBfN7lmUpCQ2Ex2 8dxd/y2DLBkxvsuL01qR5hq9OXDjKecNqBSJWG+O405VmAVmccUb0VikRoV+T/8Yst6n BXlTHXitnrD/9UpHEG65nntMijwQMORAbZc0MWohvkCptRCVvRWUv/YqT7L3y6DvRozO 4H5U11ryXVyKxymNl9Udf2uqEdl/lrUyySHHAuQSYZbTWYi4ipNqrKRWtCx9xCB+87pz Qg13VRaqhlXgOAdnC9NMD9ZbvKWEZ/J9WERJGNqvpg9SGsqVt3sdp/1ENXZ/Rf2616Cu tB9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-filter; bh=PztdEW0xhmNig1Jf/KpOL61YyUiWvUZMISRC9osi97g=; fh=gC9ke4hd5k05ULA1NF/vQH7OINmqsVQDNR6Ebg+oOxA=; b=B7UG7nJFQO0oKUyN2NrKEUzXkYGnR9PvyPzzPOx2qwbpMAwSsnTxtgJdIxOud0c59Q qnLOPPk63whoBjHFo/lDw1IpwixKPHDz8vlDlJfglnguTl/yE4a9uHHOTJVsxJtsIrLj seiw+85CTNlBfzQxkLWEqM4tkJsExlH1HAbhef17TVLxF2bvZewzjDZ6NHm1xYbs8Cx3 Mc4P8jE7xDQhLx70aFiHtAZsTRIgLl3zXz6CNYKzYpkP6g0kDgodYTeh9NxbPsS2cBei oLqMHn6Npz1SC3misATVGoti4yphWVlR67aZOHGnxesG+pUoErRV+1dSS5K3AP0fCk/w 6oCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=vxN5p6jE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=salutedevices.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id j21-20020a056a00235500b006ce93ff8cd0si591820pfj.86.2023.12.06.00.36.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 00:36:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=vxN5p6jE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=salutedevices.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 5525981EB479; Wed, 6 Dec 2023 00:36:48 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377152AbjLFIgf (ORCPT + 99 others); Wed, 6 Dec 2023 03:36:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229496AbjLFIge (ORCPT ); Wed, 6 Dec 2023 03:36:34 -0500 Received: from mx1.sberdevices.ru (mx2.sberdevices.ru [45.89.224.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE5E9C3; Wed, 6 Dec 2023 00:36:38 -0800 (PST) Received: from p-infra-ksmg-sc-msk02 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id 60DDF120060; Wed, 6 Dec 2023 11:36:37 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru 60DDF120060 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=salutedevices.com; s=mail; t=1701851797; bh=PztdEW0xhmNig1Jf/KpOL61YyUiWvUZMISRC9osi97g=; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type:From; b=vxN5p6jEcJJJiAqh3IdaPqNDQVRAmeTFUEksSk91Wl0/v0i99W8+GCqTnwum1mueZ 9iKNqcBjBs2+JGw+v9j6r8QLS3p6r9b8m/hW/JLS4sDZ4QsRiBP9Szkwql0yiAKUud YeyDL9+G2U3qH6b4GSnT363OJkrsUY3EAcnH/FZmbSgyb/7zoZYP6zVU5AarSNcMu/ W3Drw/Q+HTjsdoylnmWhJWAXXl+0evDD79GkKdJX/Bxhq2ZRxl3MPdhbN7NznSYqyt GUM+z8prfN6/UXY4m0Xhs0QjryNvr/OlAWAvWmAUpIpwLOEupQVz1Zn4dnWl/Ibin/ eNIA3Ox5aj3ew== Received: from p-i-exch-sc-m01.sberdevices.ru (p-i-exch-sc-m01.sberdevices.ru [172.16.192.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sberdevices.ru (Postfix) with ESMTPS; Wed, 6 Dec 2023 11:36:37 +0300 (MSK) Received: from [192.168.1.127] (100.64.160.123) by p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Wed, 6 Dec 2023 11:36:36 +0300 Message-ID: Date: Wed, 6 Dec 2023 11:37:02 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 02/10] leds: aw2013: unlock mutex before destroying it To: Christophe Leroy , "pavel@ucw.cz" , "lee@kernel.org" , "vadimp@nvidia.com" , "mpe@ellerman.id.au" , "npiggin@gmail.com" , "hdegoede@redhat.com" , "mazziesaccount@gmail.com" , "andy.shevchenko@gmail.com" , "jic23@kernel.org" CC: "linux-leds@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "kernel@salutedevices.com" References: <20231204180603.470421-1-gnstark@salutedevices.com> <20231204180603.470421-3-gnstark@salutedevices.com> Content-Language: en-US From: George Stark In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [100.64.160.123] X-ClientProxiedBy: p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) To p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) X-KSMG-Rule-ID: 10 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Lua-Profiles: 181886 [Dec 06 2023] X-KSMG-AntiSpam-Version: 6.0.0.2 X-KSMG-AntiSpam-Envelope-From: gnstark@salutedevices.com X-KSMG-AntiSpam-Rate: 0 X-KSMG-AntiSpam-Status: not_detected X-KSMG-AntiSpam-Method: none X-KSMG-AntiSpam-Auth: dkim=none X-KSMG-AntiSpam-Info: LuaCore: 5 0.3.5 98d108ddd984cca1d7e65e595eac546a62b0144b, {Tracking_from_domain_doesnt_match_to}, 100.64.160.123:7.1.2;p-i-exch-sc-m01.sberdevices.ru:5.0.1,7.1.1;salutedevices.com:7.1.1;127.0.0.199:7.1.2;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1, FromAlignment: s, ApMailHostAddress: 100.64.160.123 X-MS-Exchange-Organization-SCL: -1 X-KSMG-AntiSpam-Interceptor-Info: scan successful X-KSMG-AntiPhishing: Clean X-KSMG-LinksScanning: Clean X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.0.1.6960, bases: 2023/12/06 07:39:00 #22618292 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 06 Dec 2023 00:36:48 -0800 (PST) Hello Christophe Thanks for the review On 12/5/23 02:09, Christophe Leroy wrote: > > > Le 04/12/2023 à 19:05, George Stark a écrit : >> In the probe() callback in case of error mutex is destroyed being locked >> which is not allowed so unlock the mute before destroying. > > Should there be a fixes: tag ? For instance on 59ea3c9faf32 ("leds: add > aw2013 driver") ? Ack > >> >> Signed-off-by: George Stark >> --- >> 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 59765640b70f..c2bc0782c0cd 100644 >> --- a/drivers/leds/leds-aw2013.c >> +++ b/drivers/leds/leds-aw2013.c >> @@ -397,6 +397,7 @@ static int aw2013_probe(struct i2c_client *client) >> regulator_disable(chip->vcc_regulator); >> >> error: >> + mutex_unlock(&chip->mutex); >> mutex_destroy(&chip->mutex); >> return ret; >> } -- Best regards George