Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp1381561imn; Sun, 31 Jul 2022 05:01:27 -0700 (PDT) X-Google-Smtp-Source: AA6agR7B+RtJ6t8cHSl2Emr8+Khe0Zse/k3bKywz2a7q4/T+B7TKJjw87Q4ZunFb1qC2k3GjyUgu X-Received: by 2002:a17:902:6bc2:b0:16d:d2c2:7ff with SMTP id m2-20020a1709026bc200b0016dd2c207ffmr11110971plt.87.1659268886920; Sun, 31 Jul 2022 05:01:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659268886; cv=none; d=google.com; s=arc-20160816; b=0cu50G9mDKXh2cBfitUNxOQs6QMKUtZ/Bo5iRl8B2LX8mdiMqphDQ5/2vhvuuuw5aF fVB1e5YUzq8OaZrhybH+EnJ3T5ux0L3C6JNNpWAhWCMA0lBgKDQu+gioM2hndooJ6j4+ 4CdaMbfSlWmM4LKe24RtxWrqUcJFrw+ptc6afBeDgkrzyAoKzxv7ELkOoO4gvtQtkEKc AexOTOidfka3ROMj1xg5omHN7sKGqjLRgxQcG1wAdZ6t3wGr+qMBZmBYUqGYXF6KocBL XnL1IM1IfBpQUw8bXxPWCfGbmm9CLoreCHh/+tQJnRLW4LzRnbfwDhnad0S9EznJ7J/v gnIA== 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; bh=/6FVWPMskSRj/PKaPfjlV3e/9/NkzCeSg4Ygwyo4FHc=; b=JL4FixLUrcKgsKJe3zdzoT5nGothF3/AgcTqouVC1L0xFrmOeeOZDpAaVMcExyuZr1 q4BAJOwgEye7Pie8Vjm5jfifJoi6ypA2hF7TAIPxVFDb+vXa5ycHxinvhaBYPRiEvHnD 6CL2Rk41ck0spKmtiGRhr5axl2y3h70Rww+J/OTPQFFo775LfT9kjmTcYCxEepDWGdRi yBpc4pAvC5uwa35b+sIot8DblwPgjPbyceEff6pr3aQLiNAgXvB8U/dZKnBHurmOXvi+ HMySoSAVPhgLzAfpyJgAgfncG7JOHVUxiCYjxF398HY3bR2UCTIGbwHE8ffXsawhFWNU p9mw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b8-20020a17090a6ac800b001f248d48becsi12979480pjm.135.2022.07.31.05.00.53; Sun, 31 Jul 2022 05:01:26 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232262AbiGaLTc (ORCPT + 99 others); Sun, 31 Jul 2022 07:19:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232378AbiGaLTa (ORCPT ); Sun, 31 Jul 2022 07:19:30 -0400 Received: from smtp.smtpout.orange.fr (smtp04.smtpout.orange.fr [80.12.242.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FD5ECE00 for ; Sun, 31 Jul 2022 04:19:29 -0700 (PDT) Received: from pop-os.home ([90.11.190.129]) by smtp.orange.fr with ESMTPA id I6ykoVjnl0UP7I6ykoOcxz; Sun, 31 Jul 2022 13:19:27 +0200 X-ME-Helo: pop-os.home X-ME-Auth: YWZlNiIxYWMyZDliZWIzOTcwYTEyYzlhMmU3ZiQ1M2U2MzfzZDfyZTMxZTBkMTYyNDBjNDJlZmQ3ZQ== X-ME-Date: Sun, 31 Jul 2022 13:19:27 +0200 X-ME-IP: 90.11.190.129 From: Christophe JAILLET To: Andy Shevchenko , Lee Jones , Daniel Vetter , Shobhit Kumar Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , Lee Jones Subject: [PATCH] mfd: intel_soc_pmic: Fix an error handling path in intel_soc_pmic_i2c_probe() Date: Sun, 31 Jul 2022 13:19:24 +0200 Message-Id: <7c3918d7cce9643414697cef02ef636f05efb003.1659266359.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS 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 The commit in Fixes: has added a pwm_add_table() call in the probe() and a pwm_remove_table() call in the remove(), but forget to update the error handling path of the probe. Add the missing pwm_remove_table() call. Fixes: a3aa9a93df9f ("mfd: intel_soc_pmic_core: ADD PWM lookup table for CRC PMIC based PWM") Signed-off-by: Christophe JAILLET --- The order of pwm_remove_table() and regmap_del_irq_chip() is not the same as the one in the remove function. The one in this patch looks more logical to me because things are done in the reverse order of allocations... ... but in regmap_del_irq_chip() there is irq, and in such a case releasing resource is sometime tricky. Review with care. --- drivers/mfd/intel_soc_pmic_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mfd/intel_soc_pmic_core.c b/drivers/mfd/intel_soc_pmic_core.c index 5e8c94e008ed..85d070bce0e2 100644 --- a/drivers/mfd/intel_soc_pmic_core.c +++ b/drivers/mfd/intel_soc_pmic_core.c @@ -77,6 +77,7 @@ static int intel_soc_pmic_i2c_probe(struct i2c_client *i2c, return 0; err_del_irq_chip: + pwm_remove_table(crc_pwm_lookup, ARRAY_SIZE(crc_pwm_lookup)); regmap_del_irq_chip(pmic->irq, pmic->irq_chip_data); return ret; } -- 2.34.1