Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1846050rwd; Fri, 9 Jun 2023 03:07:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6lB5fgY1QejC0TSe5PRuhtTbmcIpLxwUHipxNHLDGQ0/wnewfrEgsxhTR7rIp0FL10x/t0 X-Received: by 2002:a17:902:9a8d:b0:1a9:581d:3efb with SMTP id w13-20020a1709029a8d00b001a9581d3efbmr586441plp.6.1686305222378; Fri, 09 Jun 2023 03:07:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686305222; cv=none; d=google.com; s=arc-20160816; b=R/yrkaZ6dZNKsfd3WhCZD1HUlr9CHGHisJA0xczcwMchHxMyah0YJ0P8SB79BiQf24 imX3+UoDQFwea1279Ta50s+LphBL0RT8rFGFpQHBCNMP2tBhIPFHt7FIxXcBSsjrt6Mi 9cLogt9rp2vCDKHMbrZX+yMxQ9I4oQurLi/4DT15FBdK5lg1DhgG/e5/b1Rm0gvRKEod xU+q/i+DYeJrTe2MIdIlwr+HsjUMz9TRQynMBtQK7ZBDRzSW7Reu0pXcQyIcFYPIhJ0Y BZWl1KhecrIkcFDHZLEjiOvd/Ol0DSb1rrPVYuMMUUF8oEjdXMcM59B76OIqSKaD6guM Ui1w== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d20-20020a170902e15400b001ae5fb1436asi2338908pla.184.2023.06.09.03.06.50; Fri, 09 Jun 2023 03:07:02 -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 S241644AbjFIJeI (ORCPT + 99 others); Fri, 9 Jun 2023 05:34:08 -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 ); 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 ; 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 To: Lee Jones , Maxime Coquelin , Alexandre Torgue , Amelie Delaunay CC: Amelie Delaunay , , , 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/mfd/stmfx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.25.1