]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
serial: 8250: Don't check for mctrl_gpio_init() returning -ENOSYS
authorFrieder Schrempf <frieder.schrempf@kontron.de>
Fri, 2 Aug 2019 10:04:11 +0000 (10:04 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Sep 2019 10:43:50 +0000 (12:43 +0200)
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>
drivers/tty/serial/8250/8250_core.c

index df3bcc0b2d747f920e3411972cc1462b7ad5ee3f..e682390ce0dea996a32e6719b1d717fef3299385 100644 (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;
                        }