]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
serial: sunzilog: Return proper error code from console ->setup() hook
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 18 Jun 2020 16:47:48 +0000 (19:47 +0300)
committerPetr Mladek <pmladek@suse.com>
Thu, 25 Jun 2020 12:22:17 +0000 (14:22 +0200)
For unifying console ->setup() handling, which is poorly documented,
return error code, rather than non-zero arbitrary number.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20200618164751.56828-4-andriy.shevchenko@linux.intel.com
drivers/tty/serial/sunzilog.c

index 103ab8c556e736b46649f2f2469960ecb78e732a..7ea06bbc61973e501c449e517f561f0865819b39 100644 (file)
@@ -1221,7 +1221,7 @@ static int __init sunzilog_console_setup(struct console *con, char *options)
        int baud, brg;
 
        if (up->port.type != PORT_SUNZILOG)
-               return -1;
+               return -EINVAL;
 
        printk(KERN_INFO "Console: ttyS%d (SunZilog zs%d)\n",
               (sunzilog_reg.minor - 64) + con->index, con->index);