Skip to content

Commit 4fc29e6

Browse files
andy-shevpmladek
authored andcommitted
mips: 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: Thomas Bogendoerfer <[email protected]> Signed-off-by: Petr Mladek <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 5c2fb57 commit 4fc29e6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

arch/mips/fw/arc/arc_con.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ static void prom_console_write(struct console *co, const char *s,
2828

2929
static int prom_console_setup(struct console *co, char *options)
3030
{
31-
return !(prom_flags & PROM_FLAG_USE_AS_CONSOLE);
31+
if (prom_flags & PROM_FLAG_USE_AS_CONSOLE)
32+
return 0;
33+
return -ENODEV;
3234
}
3335

3436
static struct console arc_cons = {

0 commit comments

Comments
 (0)