提交 41f632fe 编写于 作者: J Johan Hovold 提交者: Linus Walleij

pinctrl: lantiq: remove bogus of_gpio_chip_add

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: 3f8c50c9 ("OF: pinctrl: MIPS: lantiq: implement lantiq/xway
pinctrl support")
Signed-off-by: NJohan Hovold <johan@kernel.org>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 db93facf
...@@ -798,10 +798,8 @@ static int pinmux_xway_probe(struct platform_device *pdev) ...@@ -798,10 +798,8 @@ static int pinmux_xway_probe(struct platform_device *pdev)
/* load the gpio chip */ /* load the gpio chip */
xway_chip.dev = &pdev->dev; xway_chip.dev = &pdev->dev;
of_gpiochip_add(&xway_chip);
ret = gpiochip_add(&xway_chip); ret = gpiochip_add(&xway_chip);
if (ret) { if (ret) {
of_gpiochip_remove(&xway_chip);
dev_err(&pdev->dev, "Failed to register gpio chip\n"); dev_err(&pdev->dev, "Failed to register gpio chip\n");
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册