mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 01:22:07 +00:00
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>
This commit is contained in:
parent
722ccf416a
commit
f059a455fc
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user