[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK-LDbJFUTE2=LCzpH8yW5P83nREi33w18FA606xf-KZrU400w@mail.gmail.com>
Date: Mon, 4 Jun 2018 13:58:20 +0530
From: Vaishali Thakkar <vthakkar@...shalithakkar.in>
To: Marek Vasut <marek.vasut@...il.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Marek Vasut <marek.vasut+renesas@...il.com>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Lee Jones <lee.jones@...aro.org>,
Mark Brown <broonie@...nel.org>,
Steve Twiss <stwiss.opensource@...semi.com>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
linux-renesas-soc@...r.kernel.org
Subject: Re: [PATCH v3 01/10] mfd: da9063: Fix failpath in core
On Sat, Jun 2, 2018 at 3:41 PM, Marek Vasut <marek.vasut@...il.com> wrote:
> 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 <marek.vasut+renesas@...il.com>
Reviewed by: Vaishali Thakkar <vthakkar@...shalithakkar.in>
> Cc: Geert Uytterhoeven <geert+renesas@...der.be>
> Cc: Lee Jones <lee.jones@...aro.org>
> Cc: Mark Brown <broonie@...nel.org>
> Cc: Steve Twiss <stwiss.opensource@...semi.com>
> Cc: Wolfram Sang <wsa+renesas@...g-engineering.com>
> Cc: linux-renesas-soc@...r.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
>
Powered by blists - more mailing lists