1
0
Fork 0

serial: 8250: Don't check for mctrl_gpio_init() returning -ENOSYS

Now that the mctrl_gpio code returns NULL instead of ERR_PTR(-ENOSYS)
if CONFIG_GPIOLIB is disabled, we can safely remove this check.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Acked-by: Uwe Kleine-Knig <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20190802100349.8659-4-frieder.schrempf@kontron.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
alistair/sunxi64-5.4-dsi
Frieder Schrempf 2019-08-02 10:04:11 +00:00 committed by Greg Kroah-Hartman
parent e55a09732b
commit 3d7514da03
1 changed files with 2 additions and 4 deletions

View File

@ -1026,10 +1026,8 @@ int serial8250_register_8250_port(struct uart_8250_port *up)
if (!has_acpi_companion(uart->port.dev)) {
gpios = mctrl_gpio_init(&uart->port, 0);
if (IS_ERR(gpios)) {
if (PTR_ERR(gpios) != -ENOSYS) {
ret = PTR_ERR(gpios);
goto out_unlock;
}
ret = PTR_ERR(gpios);
goto out_unlock;
} else {
uart->gpios = gpios;
}