]> git.karo-electronics.de Git - karo-tx-linux.git/commit
serial: mctrl_gpio: Fix build warnings
authorFabio Estevam <fabio.estevam@freescale.com>
Tue, 10 Mar 2015 15:23:18 +0000 (12:23 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Mar 2015 12:55:20 +0000 (13:55 +0100)
commit13bc2bb9a0075342707e853e6dac298f0bbca111
tree7133d2a115f1cb2518611ee6c1365a643f151ecf
parentac25e8c72b34ad7853aad0b7008633217af0c1df
serial: mctrl_gpio: Fix build warnings

Fix the following build warnings:

drivers/tty/serial/serial_mctrl_gpio.c: In function 'mctrl_gpio_init':
drivers/tty/serial/serial_mctrl_gpio.c:110:4: warning: return makes pointer from integer without a cast
    return PTR_ERR(gpios->gpio[i]);
    ^
/home/build/work/batch/drivers/tty/serial/serial_mctrl_gpio.c:90:6: warning: unused variable 'err' [-Wunused-variable]
  int err;
      ^

Return ERR_CAST and remove the unused 'err' variable to fix them.

Fixes: 1d267ea6539f ("serial: mctrl-gpio: simplify init routine")
Reported-by: Olof's autobuilder <build@lixom.net>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/serial_mctrl_gpio.c