public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pinctrl: qcom: Release pin ranges when gpiochip_irqchip_add fails
@ 2014-08-27 10:57 Pramod Gurav
  2014-08-27 21:24 ` Bjorn Andersson
  2014-09-02 12:29 ` Linus Walleij
  0 siblings, 2 replies; 6+ messages in thread
From: Pramod Gurav @ 2014-08-27 10:57 UTC (permalink / raw)
  To: linux-kernel, linux-arm-msm
  Cc: Pramod Gurav, Ivan T. Ivanov, Bjorn Andersson, Linus Walleij

This patches adds a call to gpiochip_remove_pin_ranges when
gpiochip_irqchip_add fails to release memory allocated for pin_ranges.

CC: Ivan T. Ivanov <iivanov@mm-sol.com>
CC: Bjorn Andersson <bjorn.andersson@sonymobile.com>
CC: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
---
 drivers/pinctrl/qcom/pinctrl-msm.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
index f4e4f8f..aa34b5a 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm.c
@@ -845,6 +845,7 @@ static int msm_gpio_init(struct msm_pinctrl *pctrl)
 				   IRQ_TYPE_NONE);
 	if (ret) {
 		dev_err(pctrl->dev, "Failed to add irqchip to gpiochip\n");
+		gpiochip_remove_pin_ranges(chip);
 		return -ENOSYS;
 	}
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-09-02 12:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-27 10:57 [PATCH] pinctrl: qcom: Release pin ranges when gpiochip_irqchip_add fails Pramod Gurav
2014-08-27 21:24 ` Bjorn Andersson
2014-08-28  7:13   ` Pramod Gurav
2014-08-29  3:49     ` Bjorn Andersson
2014-08-29  7:19       ` Pramod Gurav
2014-09-02 12:29 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox