Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1533378imm; Sat, 2 Jun 2018 03:14:34 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKdggYamPr/JLxZw19EV7hy8jte5kfr9HnqXO4RVEoTTtfSYC66glOMqAGZHNe8xEXCnt7N X-Received: by 2002:a17:902:76c9:: with SMTP id j9-v6mr2943789plt.15.1527934474317; Sat, 02 Jun 2018 03:14:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527934474; cv=none; d=google.com; s=arc-20160816; b=mV2ZKzPF15TMZeobK8N9KyqrCO3rxTHeGIV8+DEe5CwMdB3iGn0756mh5pOdT6QUod LPGs/INQ3GsTtiJFaJarSJUcpkGUsYhV+pJ82efFJU+cHcAYyrKeQOrYxRh9pIUKU4dk Ue/FTDu5B65IOFD3gDcyNQ9jn0ibiLg4FCdGWRHq9/V6fHX9+V06PQL0Owb0IeiwesiL UtQrPmCNhH6xf83nnbsTW2fKAjwupi1lcXN9LK6UvfXVNay2NNCWD32LzMRRPywOtGKw z6d1mUyG1X8BAu7kFFOGoQJ5LzkuFtv8kQfyKigqTEQEZGD13erjTLOuCrVVuzzyIKQF o+Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=1cdCxrnlzrVv/ISBxrgxi3HQZGnbpL3rN0jjQkJdT24=; b=rD+hscn7XbUSWdLOmOD/MKvqcW+ZDohsc3CCNV8X1yZJWRMS1V26f0Vy9eobNQnvj+ nI4HqiIGWBWlwLhEk5UhrogZv6Sph2ox7oFspY+bOJFG86Ec/ua0rIdu4HKhWbGhFmdj 3UrBnSq6GWtorBX/2EIkctjrp5gv70RGjgBOjrxa6PTpjQJTAb8wk+oDMbCijCyqutuI OYIvn/9adAit2xqnIue1tCa0ayooSxQqsDdhGbrhSluWb79Yo3KSJyd0UK/bdwyPZxEl Po6A/snEfp9e+Ne81Y1MeX/7cCtIz6kPk5fkVC3+eG8hCx80PGkkhi7oZrKbLdPE5QFa k47A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=njz4Ijys; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g1-v6si40964287pld.11.2018.06.02.03.13.36; Sat, 02 Jun 2018 03:14:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=njz4Ijys; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751498AbeFBKMU (ORCPT + 99 others); Sat, 2 Jun 2018 06:12:20 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:39107 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750869AbeFBKMQ (ORCPT ); Sat, 2 Jun 2018 06:12:16 -0400 Received: by mail-wm0-f68.google.com with SMTP id p11-v6so5895323wmc.4; Sat, 02 Jun 2018 03:12:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=1cdCxrnlzrVv/ISBxrgxi3HQZGnbpL3rN0jjQkJdT24=; b=njz4IjysmcdVznE2k35ORjCKS9HJ4J2iqJgNUujwBp6CpbdXQ2VHw6ap48+T5jbkiP KZaeZTrmrhSKNsYmtCx85ldspufuuxS/J7qU6Eib71Lxyks38aVihj+Au4J4ID03NUkb 2Di0XnCWOsUS09fcsIqsUMsN/Z3sCgrBogSiPPe3lyFUONr8k64IcMpbYvHNwI5ZukIV iuH4LmHRLcIO5sBwCFZPrp7y/shRaW7QTnOeRocZnrNqKdYyI94hjTcbgYe2kcAAdJt6 QDnLrjgjBgIyL4e0WBN+SSQfndULM3mw/HQ3UpEsTJYTeZ//T7r+1L8Z09jAHZ6WeVdn qDnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=1cdCxrnlzrVv/ISBxrgxi3HQZGnbpL3rN0jjQkJdT24=; b=nCCTxATos4sKLm9W3K3Z0rgee1LwFbAkE8OKkOXMngC122YxyI7wajBCrJdRnWrmkx Gu7B9t80RBAjlxSuvTdK/Wscq/AOO2oTUGjyMx7oUfnNktaihVtMhCJFUAExOZljPzez hrugFsw0JPlGz01jseDKg9l/ayT60B5RJJt6QD2LS1AVnhHQbpZ9M1s2KY0N8sDBixgo ZpTrPmnJBH3QkW00ucbaj5z35nycwGZwbBrq9SFX4vZTSuRK+lZWNq2i3Ura+sBHyUyb KDHI2c7fI8Y+j/Wc1qdomKBonEXF5zE05HDTcwvlhN/CecP7lmo35vP/tAe6fI/mAvTr 3FdA== X-Gm-Message-State: APt69E2/oXyugVBv/xXpA//ODhnaRRyiG8Xm+NqTrS5TT2oSb/RnH92p zpyzsCHzQJeTom76yTTPnUqJWUl6 X-Received: by 2002:a1c:d70c:: with SMTP id o12-v6mr4367378wmg.71.1527934334957; Sat, 02 Jun 2018 03:12:14 -0700 (PDT) Received: from kurokawa.lan (ip-86-49-107-50.net.upcbroadband.cz. [86.49.107.50]) by smtp.gmail.com with ESMTPSA id b16-v6sm38624797wrm.89.2018.06.02.03.12.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 02 Jun 2018 03:12:14 -0700 (PDT) From: Marek Vasut X-Google-Original-From: Marek Vasut To: linux-kernel@vger.kernel.org Cc: Marek Vasut , Geert Uytterhoeven , Lee Jones , Mark Brown , Steve Twiss , Wolfram Sang , linux-renesas-soc@vger.kernel.org Subject: [PATCH v3 01/10] mfd: da9063: Fix failpath in core Date: Sat, 2 Jun 2018 12:11:46 +0200 Message-Id: <20180602101155.26375-1-marek.vasut+renesas@gmail.com> X-Mailer: git-send-email 2.16.2 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In case mfd_add_devices() fails, da9063_irq_exit() is not called to undo the IRQchip setup done by da9063_irq_init(). Fix this by adding the missing fail path. Signed-off-by: Marek Vasut Cc: Geert Uytterhoeven Cc: Lee Jones Cc: Mark Brown Cc: Steve Twiss Cc: Wolfram Sang Cc: linux-renesas-soc@vger.kernel.org --- V3: New patch --- drivers/mfd/da9063-core.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/da9063-core.c b/drivers/mfd/da9063-core.c index 6c2870d4e754..8226ebd8b96d 100644 --- a/drivers/mfd/da9063-core.c +++ b/drivers/mfd/da9063-core.c @@ -229,10 +229,16 @@ int da9063_device_init(struct da9063 *da9063, unsigned int irq) ret = mfd_add_devices(da9063->dev, -1, da9063_devs, ARRAY_SIZE(da9063_devs), NULL, da9063->irq_base, NULL); - if (ret) + if (ret) { dev_err(da9063->dev, "Cannot add MFD cells\n"); + goto err_irq_exit; + } return ret; + +err_irq_exit: + da9063_irq_exit(da9063); + return ret; } void da9063_device_exit(struct da9063 *da9063) -- 2.16.2