From patchwork Tue Jun 23 19:54:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 223125 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F7CEC433E0 for ; Tue, 23 Jun 2020 21:30:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4363F207DD for ; Tue, 23 Jun 2020 21:30:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592947847; bh=4nSZAdh0C+LyUZmGaYK7ICPBjH/eBkel2iGSn91HaAc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=L9R3JjTbZti2iQZ5wijQSO3gVj+taMm7h7nh2xFxyHvvfwzIuYOcCsJhn7n98pJ4K mWjPk+04UfprqYPsCwiYoENymiHa+Lk5x4/446MRuH6i3u4S6xE16rXIkrP0OmKLgj XS4GgeH/mT39B/GIHI+yQAlgJDoUVgjQsUfMxUqs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387696AbgFWUNU (ORCPT ); Tue, 23 Jun 2020 16:13:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:55310 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389071AbgFWUNR (ORCPT ); Tue, 23 Jun 2020 16:13:17 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 93FEB2078A; Tue, 23 Jun 2020 20:13:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592943197; bh=4nSZAdh0C+LyUZmGaYK7ICPBjH/eBkel2iGSn91HaAc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bk2cSn4ADawK4veEkDXOUjIECBqjRnbto4ytyr7eARofqpeBlDlNHdaOUuIDWDkpv 0tiAPre8BdlV/EZdEfv8l1Qhn8Ta4WTiRS49ml+4JFtg6OklU88s9O7lXAStFgOxUS ho4HuI2rI97CW7rnz9ppj04TBjieGrVpjgDReEgo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Amelie Delaunay , Lee Jones , Sasha Levin Subject: [PATCH 5.7 270/477] mfd: stmfx: Fix stmfx_irq_init error path Date: Tue, 23 Jun 2020 21:54:27 +0200 Message-Id: <20200623195420.331220213@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200623195407.572062007@linuxfoundation.org> References: <20200623195407.572062007@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Amelie Delaunay [ Upstream commit 60c2c4bcb9202acad4cc26af20b44b6bd7874f7b ] In case the interrupt signal can't be configured, IRQ domain needs to be removed. Fixes: 06252ade9156 ("mfd: Add ST Multi-Function eXpander (STMFX) core driver") Signed-off-by: Amelie Delaunay Signed-off-by: Lee Jones Signed-off-by: Sasha Levin --- drivers/mfd/stmfx.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/stmfx.c b/drivers/mfd/stmfx.c index fde6541e347c8..1977fe95f876c 100644 --- a/drivers/mfd/stmfx.c +++ b/drivers/mfd/stmfx.c @@ -287,14 +287,19 @@ static int stmfx_irq_init(struct i2c_client *client) ret = regmap_write(stmfx->map, STMFX_REG_IRQ_OUT_PIN, irqoutpin); if (ret) - return ret; + goto irq_exit; ret = devm_request_threaded_irq(stmfx->dev, client->irq, NULL, stmfx_irq_handler, irqtrigger | IRQF_ONESHOT, "stmfx", stmfx); if (ret) - stmfx_irq_exit(client); + goto irq_exit; + + return 0; + +irq_exit: + stmfx_irq_exit(client); return ret; }