提交 e27e2786 编写于 作者: L Linus Walleij

tty: sc16is7xx: remove retval from gpiochip_remove()

We are trying to smoke out the use of the return value from
gpiochip_remove() from the kernel, this has been missed.
Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 da26d5d8
...@@ -1157,7 +1157,7 @@ static int sc16is7xx_probe(struct device *dev, ...@@ -1157,7 +1157,7 @@ static int sc16is7xx_probe(struct device *dev,
#ifdef CONFIG_GPIOLIB #ifdef CONFIG_GPIOLIB
if (devtype->nr_gpio) if (devtype->nr_gpio)
WARN_ON(gpiochip_remove(&s->gpio)); gpiochip_remove(&s->gpio);
out_uart: out_uart:
#endif #endif
...@@ -1173,14 +1173,11 @@ static int sc16is7xx_probe(struct device *dev, ...@@ -1173,14 +1173,11 @@ static int sc16is7xx_probe(struct device *dev,
static int sc16is7xx_remove(struct device *dev) static int sc16is7xx_remove(struct device *dev)
{ {
struct sc16is7xx_port *s = dev_get_drvdata(dev); struct sc16is7xx_port *s = dev_get_drvdata(dev);
int i, ret = 0; int i;
#ifdef CONFIG_GPIOLIB #ifdef CONFIG_GPIOLIB
if (s->devtype->nr_gpio) { if (s->devtype->nr_gpio)
ret = gpiochip_remove(&s->gpio); gpiochip_remove(&s->gpio);
if (ret)
return ret;
}
#endif #endif
for (i = 0; i < s->uart.nr; i++) { for (i = 0; i < s->uart.nr; i++) {
...@@ -1195,7 +1192,7 @@ static int sc16is7xx_remove(struct device *dev) ...@@ -1195,7 +1192,7 @@ static int sc16is7xx_remove(struct device *dev)
if (!IS_ERR(s->clk)) if (!IS_ERR(s->clk))
clk_disable_unprepare(s->clk); clk_disable_unprepare(s->clk);
return ret; return 0;
} }
static const struct of_device_id __maybe_unused sc16is7xx_dt_ids[] = { static const struct of_device_id __maybe_unused sc16is7xx_dt_ids[] = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册