Skip to content

Commit

Permalink
mips: Return proper error code from console ->setup() hook
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Andy Shevchenko authored and Petr Mladek committed Jun 25, 2020
1 parent 5c2fb57 commit 4fc29e6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/mips/fw/arc/arc_con.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ static void prom_console_write(struct console *co, const char *s,

static int prom_console_setup(struct console *co, char *options)
{
return !(prom_flags & PROM_FLAG_USE_AS_CONSOLE);
if (prom_flags & PROM_FLAG_USE_AS_CONSOLE)
return 0;
return -ENODEV;
}

static struct console arc_cons = {
Expand Down

0 comments on commit 4fc29e6

Please sign in to comment.