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 | |
parent | 722ccf416ac2804cdb9b5c84e81524fab775a577 (diff) | |
download | op-kernel-dev-f059a455fc979e0e7f155d98bf628fccab1c5b88.zip op-kernel-dev-f059a455fc979e0e7f155d98bf628fccab1c5b88.tar.gz |
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 'drivers/tty/serial')
-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) |