aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2014-09-16 18:14:46 -0400
committerLinus Walleij <linus.walleij@linaro.org>2014-09-23 11:51:36 -0400
commite27e278608d0dca1b97abea3c1855beafcc68bcb (patch)
tree19506e8492e1606c142540e01953fbbbc66eb6e7 /drivers/tty
parentda26d5d803e45a30c7d72b83ce906f3a466f4cc3 (diff)
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/sc16is7xx.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
index 3284c31085a7..6246820d7f05 100644
--- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c
@@ -1157,7 +1157,7 @@ static int sc16is7xx_probe(struct device *dev,
1157 1157
1158#ifdef CONFIG_GPIOLIB 1158#ifdef CONFIG_GPIOLIB
1159 if (devtype->nr_gpio) 1159 if (devtype->nr_gpio)
1160 WARN_ON(gpiochip_remove(&s->gpio)); 1160 gpiochip_remove(&s->gpio);
1161 1161
1162out_uart: 1162out_uart:
1163#endif 1163#endif
@@ -1173,14 +1173,11 @@ out_clk:
1173static int sc16is7xx_remove(struct device *dev) 1173static int sc16is7xx_remove(struct device *dev)
1174{ 1174{
1175 struct sc16is7xx_port *s = dev_get_drvdata(dev); 1175 struct sc16is7xx_port *s = dev_get_drvdata(dev);
1176 int i, ret = 0; 1176 int i;
1177 1177
1178#ifdef CONFIG_GPIOLIB 1178#ifdef CONFIG_GPIOLIB
1179 if (s->devtype->nr_gpio) { 1179 if (s->devtype->nr_gpio)
1180 ret = gpiochip_remove(&s->gpio); 1180 gpiochip_remove(&s->gpio);
1181 if (ret)
1182 return ret;
1183 }
1184#endif 1181#endif
1185 1182
1186 for (i = 0; i < s->uart.nr; i++) { 1183 for (i = 0; i < s->uart.nr; i++) {
@@ -1195,7 +1192,7 @@ static int sc16is7xx_remove(struct device *dev)
1195 if (!IS_ERR(s->clk)) 1192 if (!IS_ERR(s->clk))
1196 clk_disable_unprepare(s->clk); 1193 clk_disable_unprepare(s->clk);
1197 1194
1198 return ret; 1195 return 0;
1199} 1196}
1200 1197
1201static const struct of_device_id __maybe_unused sc16is7xx_dt_ids[] = { 1198static const struct of_device_id __maybe_unused sc16is7xx_dt_ids[] = {