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 <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Petr Mladek <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent f85956b commit 8629d27

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)