Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1495781 > unrolled thread

[PATCH] gpio/gpio-mxs : Unmap region obtained by of_iomap

Started byArvind Yadav <arvind.yadav.cs@gmail.com>
First post2016-10-05 11:50 +0200
Last post2016-10-10 10:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] gpio/gpio-mxs : Unmap region obtained by of_iomap Arvind Yadav <arvind.yadav.cs@gmail.com> - 2016-10-05 11:50 +0200
    Re: [PATCH] gpio/gpio-mxs : Unmap region obtained by of_iomap Linus Walleij <linus.walleij@linaro.org> - 2016-10-10 10:50 +0200

#1495781 — [PATCH] gpio/gpio-mxs : Unmap region obtained by of_iomap

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2016-10-05 11:50 +0200
Subject[PATCH] gpio/gpio-mxs : Unmap region obtained by of_iomap
Message-ID<soQZP-7rL-15@gated-at.bofh.it>
Free memory mapping, if mxs_gpio_probe is not successful.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/gpio/gpio-mxs.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/gpio-mxs.c b/drivers/gpio/gpio-mxs.c
index b9daa0b..ee17248 100644
--- a/drivers/gpio/gpio-mxs.c
+++ b/drivers/gpio/gpio-mxs.c
@@ -308,8 +308,10 @@ static int mxs_gpio_probe(struct platform_device *pdev)
 	writel(~0U, port->base + PINCTRL_IRQSTAT(port) + MXS_CLR);
 
 	irq_base = irq_alloc_descs(-1, 0, 32, numa_node_id());
-	if (irq_base < 0)
-		return irq_base;
+	if (irq_base < 0) {
+		err = irq_base;
+		goto out_iounmap;
+	}
 
 	port->domain = irq_domain_add_legacy(np, 32, irq_base, 0,
 					     &irq_domain_simple_ops, NULL);
@@ -349,6 +351,8 @@ out_irqdomain_remove:
 	irq_domain_remove(port->domain);
 out_irqdesc_free:
 	irq_free_descs(irq_base, 32);
+out_iounmap:
+	iounmap(port->base);
 	return err;
 }
 
-- 
1.7.9.5

[toc] | [next] | [standalone]


#1498168

FromLinus Walleij <linus.walleij@linaro.org>
Date2016-10-10 10:50 +0200
Message-ID<sqErv-7rt-5@gated-at.bofh.it>
In reply to#1495781
On Wed, Oct 5, 2016 at 11:38 AM, Arvind Yadav <arvind.yadav.cs@gmail.com> wrote:

> Free memory mapping, if mxs_gpio_probe is not successful.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>

Patch applied.

Yours,
Linus Walleij

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web