diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2015-02-12 15:24:39 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-07 03:15:03 +0100 |
commit | f059a455fc979e0e7f155d98bf628fccab1c5b88 (patch) | |
tree | aece0e389d34cc08d7ce8173315332ff58f28d06 /drivers/tty/serial/clps711x.c | |
parent | serial: atmel: fix error handling when mctrl_gpio_init fails (diff) | |
download | linux-f059a455fc979e0e7f155d98bf628fccab1c5b88.tar.xz linux-f059a455fc979e0e7f155d98bf628fccab1c5b88.zip |
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>
Diffstat (limited to '')
-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 6e11c275f2ab..d5d2dd7c7917 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) |