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
parent
e55a09732b
commit
3d7514da03
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue