diff options
author | Pramod Gurav <[email protected]> | 2014-09-09 13:21:40 +0530 |
---|---|---|
committer | Linus Walleij <[email protected]> | 2014-09-23 16:53:18 +0200 |
commit | 7471725f618b95d2a61a4bf789dbdc5c7805ffa9 (patch) | |
tree | 7bd0fd5c415aa75bcef91d77e64d9f00692e0bfb | |
parent | 834e1678649db1e064ee397cca161a65bacfa801 (diff) |
pinctrl: st: remove gpiochip in failure cases
This patch releases gpiochip related resources by calling
gpiochip_remove when gpiochip_irqchip_add fails.
Cc: Maxime Coquelin <[email protected]>
Cc: Patrice Chotard <[email protected]>
Cc: Bjorn Andersson <[email protected]>
Acked-by: Srinivas Kandagatla <[email protected]>
Signed-off-by: Pramod Gurav <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
-rw-r--r-- | drivers/pinctrl/pinctrl-st.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c index 6c4c41bed1e3..4b1792aad3d8 100644 --- a/drivers/pinctrl/pinctrl-st.c +++ b/drivers/pinctrl/pinctrl-st.c @@ -1517,6 +1517,7 @@ static int st_gpiolib_register_bank(struct st_pinctrl *info, 0, handle_simple_irq, IRQ_TYPE_LEVEL_LOW); if (err) { + gpiochip_remove(&bank->gpio_chip); dev_info(dev, "could not add irqchip\n"); return err; } |