diff mbox

pinctrl: lantiq: remove bogus of_gpio_chip_add

Message ID 1421079651-2650-1-git-send-email-johan@kernel.org
State New, archived
Headers show

Commit Message

Johan Hovold Jan. 12, 2015, 4:20 p.m. UTC
Remove bogus call to of_gpiochip_add (and of_gpio_chip remove in error
path) which is also called when adding the gpio chip.

This prevents adding the same pinctrl range twice.

Fixes: 3f8c50c9b110 ("OF: pinctrl: MIPS: lantiq: implement lantiq/xway
pinctrl support")

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/pinctrl/pinctrl-xway.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Linus Walleij Jan. 14, 2015, 1:18 p.m. UTC | #1
On Mon, Jan 12, 2015 at 5:20 PM, Johan Hovold <johan@kernel.org> wrote:

> Remove bogus call to of_gpiochip_add (and of_gpio_chip remove in error
> path) which is also called when adding the gpio chip.
>
> This prevents adding the same pinctrl range twice.
>
> Fixes: 3f8c50c9b110 ("OF: pinctrl: MIPS: lantiq: implement lantiq/xway
> pinctrl support")
>
> Signed-off-by: Johan Hovold <johan@kernel.org>

Very weird. Patch applied.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/pinctrl/pinctrl-xway.c b/drivers/pinctrl/pinctrl-xway.c
index c5cef59f5965..779950c62e53 100644
--- a/drivers/pinctrl/pinctrl-xway.c
+++ b/drivers/pinctrl/pinctrl-xway.c
@@ -798,10 +798,8 @@  static int pinmux_xway_probe(struct platform_device *pdev)
 
 	/* load the gpio chip */
 	xway_chip.dev = &pdev->dev;
-	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;
 	}