diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2015-02-12 14:24:39 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-07 02:15:03 (GMT) |
commit | f059a455fc979e0e7f155d98bf628fccab1c5b88 (patch) | |
tree | aece0e389d34cc08d7ce8173315332ff58f28d06 | |
parent | 722ccf416ac2804cdb9b5c84e81524fab775a577 (diff) | |
download | linux-f059a455fc979e0e7f155d98bf628fccab1c5b88.tar.xz |
serial: clps711x: fail if mctrl_gpio_init fails
mctrl_gpio_init is fully aware of being optional. If it returns an error
code this indicates a real error that must not be ignored.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/serial/clps711x.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tty/serial/clps711x.c b/drivers/tty/serial/clps711x.c index 6e11c27..d5d2dd7 100644 --- a/drivers/tty/serial/clps711x.c +++ b/drivers/tty/serial/clps711x.c @@ -501,6 +501,8 @@ static int uart_clps711x_probe(struct platform_device *pdev) platform_set_drvdata(pdev, s); s->gpios = mctrl_gpio_init(&pdev->dev, 0); + if (IS_ERR(s->gpios)) + return PTR_ERR(s->gpios); ret = uart_add_one_port(&clps711x_uart, &s->port); if (ret) |