]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
serial: 8250_platform: Don't shadow error from serial8250_register_8250_port()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 12 Aug 2024 15:47:04 +0000 (18:47 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Aug 2024 06:22:50 +0000 (08:22 +0200)
Don't shadow error from serial8250_register_8250_port() and return it as is.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240812154901.1068407-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_platform.c

index 8e1cedf36db28d4673d725933a11f3bf56a5207e..5f0ea39c4af2c98ec88e8c55cb7fdf53f9dd780b 100644 (file)
@@ -150,7 +150,7 @@ static int serial8250_platform_probe(struct platform_device *pdev)
 
        line = serial8250_register_8250_port(&uart);
        if (line < 0)
-               return -ENODEV;
+               return line;
 
        return 0;
 }