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 <andriy.shevchenko@linux.intel.com> Reviewed-by: Petr Mladek <pmladek@suse.com> Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20200618164751.56828-2-andriy.shevchenko@linux.intel.com
1 parent 5c2fb57 commit 4fc29e6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

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)