lkml.org 
[lkml]   [2014]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] pinctrl: qcom: Release pin ranges when gpiochip_irqchip_add fails
Date
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


\
 
 \ /
  Last update: 2014-08-27 13:21    [W:0.070 / U:1.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site