* [PATCH v2] pinctrl: lantiq: Release gpiochip resources in fail case
@ 2014-09-09 8:05 Pramod Gurav
2014-09-23 10:23 ` Linus Walleij
0 siblings, 1 reply; 2+ messages in thread
From: Pramod Gurav @ 2014-09-09 8:05 UTC (permalink / raw)
To: linux-kernel; +Cc: John Crispin, Linus Walleij
This patch releases gpiochip resources with of_gpiochip_remove
and gpiochip_remove in failure cases.
CC: John Crispin <blogic@openwrt.org>
CC: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
---
Changes since v1:
Dropped call to of_gpiochip_remove() when ltq_pinctrl_register fails as
gpiochip_remove() calls of_gpiochip_remove()
drivers/pinctrl/pinctrl-xway.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/pinctrl/pinctrl-xway.c b/drivers/pinctrl/pinctrl-xway.c
index e66f4ca..37040ab 100644
--- a/drivers/pinctrl/pinctrl-xway.c
+++ b/drivers/pinctrl/pinctrl-xway.c
@@ -801,6 +801,7 @@ static int pinmux_xway_probe(struct platform_device *pdev)
of_gpiochip_add(&xway_chip);
ret = gpiochip_add(&xway_chip);
if (ret) {
+ of_gpiochip_remove(&xway_chip);
dev_err(&pdev->dev, "Failed to register gpio chip\n");
return ret;
}
@@ -822,6 +823,7 @@ static int pinmux_xway_probe(struct platform_device *pdev)
/* register with the generic lantiq layer */
ret = ltq_pinctrl_register(pdev, &xway_info);
if (ret) {
+ gpiochip_remove(&xway_chip);
dev_err(&pdev->dev, "Failed to register pinctrl driver\n");
return ret;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] pinctrl: lantiq: Release gpiochip resources in fail case
2014-09-09 8:05 [PATCH v2] pinctrl: lantiq: Release gpiochip resources in fail case Pramod Gurav
@ 2014-09-23 10:23 ` Linus Walleij
0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2014-09-23 10:23 UTC (permalink / raw)
To: Pramod Gurav; +Cc: linux-kernel, John Crispin
On Tue, Sep 9, 2014 at 10:05 AM, Pramod Gurav
<pramod.gurav@smartplayin.com> wrote:
> This patch releases gpiochip resources with of_gpiochip_remove
> and gpiochip_remove in failure cases.
>
> CC: John Crispin <blogic@openwrt.org>
> CC: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
> ---
>
> Changes since v1:
> Dropped call to of_gpiochip_remove() when ltq_pinctrl_register fails as
> gpiochip_remove() calls of_gpiochip_remove()
Patch applied.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-09-23 10:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-09 8:05 [PATCH v2] pinctrl: lantiq: Release gpiochip resources in fail case Pramod Gurav
2014-09-23 10:23 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).