Skip to content

Commit 9f02842

Browse files
andy-shevpmladek
authored andcommitted
tty: hvc: 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]> Signed-off-by: Petr Mladek <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 8629d27 commit 9f02842

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/tty/hvc/hvsi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1128,7 +1128,7 @@ static int __init hvsi_console_setup(struct console *console, char *options)
11281128
int ret;
11291129

11301130
if (console->index < 0 || console->index >= hvsi_count)
1131-
return -1;
1131+
return -EINVAL;
11321132
hp = &hvsi_ports[console->index];
11331133

11341134
/* give the FSP a chance to change the baud rate when we re-open */

0 commit comments

Comments
 (0)