Skip to content

Commit 8629d27

Browse files
andy-shevpmladek
authored andcommitted
serial: sunzilog: Return proper error code from console ->setup() hook
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
1 parent f85956b commit 8629d27

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/tty/serial/sunzilog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1221,7 +1221,7 @@ static int __init sunzilog_console_setup(struct console *con, char *options)
12211221
int baud, brg;
12221222

12231223
if (up->port.type != PORT_SUNZILOG)
1224-
return -1;
1224+
return -EINVAL;
12251225

12261226
printk(KERN_INFO "Console: ttyS%d (SunZilog zs%d)\n",
12271227
(sunzilog_reg.minor - 64) + con->index, con->index);

0 commit comments

Comments
 (0)