Message ID | 20230609092804.793100-1-amelie.delaunay@foss.st.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp830432vqr; Fri, 9 Jun 2023 02:59:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7UootGCBTqO/MxaPVszVpDVb1UejtrcMSpTJ3AGPuEAOyaPEx//AiLawlNF9rxFErGxQFc X-Received: by 2002:a05:6a20:c183:b0:10c:7c72:bdf9 with SMTP id bg3-20020a056a20c18300b0010c7c72bdf9mr506324pzb.29.1686304791302; Fri, 09 Jun 2023 02:59:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686304791; cv=none; d=google.com; s=arc-20160816; b=iUYtHDmii6ql9IlfAKF1ibALRVCxEhdtPmLO1heUk2bjbUUCfE1cqT0w1jgr00H2fA 6O4A/fGMy1TXF93gxEjmRDR7htT+KoGYHCqblaK7jIW7HA/b5OWcjluwXs3EDObBS9Nr SZuieBWBbZglEKE6W3BVbwvRB3bSnquiWsM9amoxLwK81MeX7iVjFSN1apHpY9xjjzAr qivDmMVDgvci3RjyWMnDNl5CXyrJtejnQ9J+0+5SndkFhCgBczmB8A+J280aZlCpaNht gOSkpjnRUa5Hu7O2Vw2ILPRMNmsbC28dGxFvITvpc+Xyc4GEu+3Ze9RtndhDgMwRuvw3 8Fpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=GTqcvEeUANYaQZ0mEwT7i0/9oxw/QIgRkiDnAaUF2ws=; b=sFOckx7kkMtAdq0+OlLe284vIEv3dVVR8OVbkk2l1V+RccMIBkVEWqiD1XALwLpud0 vhAQyDpQC6T+IOb0/l6uzHB8L4WNwNr88jqw/OnVQpV7RCwolfwlFqchJQCzHRbGHCnp ZK+t0iBCg28Lg6FqZmS8xcECEdWbD39pbziOGxbhdAqae+g9NDEGZzpWU2r13cvntq67 +6IDIJtMuwbnO5+t6hd3G4GKfqMjbik37MtNptRine6Ouw9D2xx6gquZTe8EE7TPfqeB pdFe6CPBPYVulMxaWvxHLrYDQy7kawNKyFz76Iakaps3zpXAgnJH25sAmHS/vmFUpxlO CtOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=Jeyawc41; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d15-20020a170903230f00b001aaf5dcd774si2622860plh.173.2023.06.09.02.59.37; Fri, 09 Jun 2023 02:59:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=Jeyawc41; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240036AbjFIJeJ (ORCPT <rfc822;liningstudo@gmail.com> + 99 others); Fri, 9 Jun 2023 05:34:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241390AbjFIJdw (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 9 Jun 2023 05:33:52 -0400 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FDDF421A for <linux-kernel@vger.kernel.org>; Fri, 9 Jun 2023 02:28:48 -0700 (PDT) Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3596OEvp028054; Fri, 9 Jun 2023 11:28:15 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=selector1; bh=GTqcvEeUANYaQZ0mEwT7i0/9oxw/QIgRkiDnAaUF2ws=; b=Jeyawc4155+H0e4WG6I2FHa9RALoeNNNlO2v6NM9Xot4Yp55e2fDQWunC2ynQp9vLIs0 EamGJhqP7k4l2NkM6dutYKtHPkB6djwW2AkZAKHBL+9a6VTgJX3wLyoxw33RySJXcJwW n9tRSEtVL8pkJwhVeTzLgpZYMnzhLj6c+Gms5sNA0WWHpn6WyYapTjKzOdDCCI5m5oPH ryL8HeS0RKA79EfR0wXL2jLCiXVXhJUmjcgZF2Dt34J3zYJ6vlcCyomf+fWMSk+Y8jDQ w5llwy6byy27k//nqL2NnsFLb6wXx4TYDVnajaVLkmhJY7ocKbJOtynYLMu/ABMq1ClG Jg== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3r3xsf9bqv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 09 Jun 2023 11:28:15 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 32D5710002A; Fri, 9 Jun 2023 11:28:14 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node3.st.com [10.75.129.71]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 2C988210F8B; Fri, 9 Jun 2023 11:28:14 +0200 (CEST) Received: from localhost (10.252.12.6) by SHFDAG1NODE3.st.com (10.75.129.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Fri, 9 Jun 2023 11:28:13 +0200 From: Amelie Delaunay <amelie.delaunay@foss.st.com> To: Lee Jones <lee@kernel.org>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Amelie Delaunay <amelie.delaunay@st.com> CC: Amelie Delaunay <amelie.delaunay@foss.st.com>, <linux-stm32@st-md-mailman.stormreply.com>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org> Subject: [RESEND PATCH 1/2] mfd: stmfx: Fix error path in stmfx_chip_init Date: Fri, 9 Jun 2023 11:28:03 +0200 Message-ID: <20230609092804.793100-1-amelie.delaunay@foss.st.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.252.12.6] X-ClientProxiedBy: EQNCAS1NODE4.st.com (10.75.129.82) To SHFDAG1NODE3.st.com (10.75.129.71) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-09_06,2023-06-08_01,2023-05-22_02 X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768218732996504262?= X-GMAIL-MSGID: =?utf-8?q?1768218732996504262?= |
Series |
[RESEND,1/2] mfd: stmfx: Fix error path in stmfx_chip_init
|
|
Commit Message
Amelie Delaunay
June 9, 2023, 9:28 a.m. UTC
In error path, disable vdd regulator if it exists, but don't overload ret.
Because if regulator_disable() is successful, stmfx_chip_init will exit
successfully while chip init failed.
Fixes: 06252ade9156 ("mfd: Add ST Multi-Function eXpander (STMFX) core driver")
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
---
drivers/mfd/stmfx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Fri, 09 Jun 2023, Amelie Delaunay wrote: > In error path, disable vdd regulator if it exists, but don't overload ret. > Because if regulator_disable() is successful, stmfx_chip_init will exit > successfully while chip init failed. > > Fixes: 06252ade9156 ("mfd: Add ST Multi-Function eXpander (STMFX) core driver") > Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com> > --- > drivers/mfd/stmfx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied, thanks
diff --git a/drivers/mfd/stmfx.c b/drivers/mfd/stmfx.c index f30c7c304147..54cc902cb578 100644 --- a/drivers/mfd/stmfx.c +++ b/drivers/mfd/stmfx.c @@ -387,7 +387,7 @@ static int stmfx_chip_init(struct i2c_client *client) err: if (stmfx->vdd) - return regulator_disable(stmfx->vdd); + regulator_disable(stmfx->vdd); return ret; }