summaryrefslogtreecommitdiff
path: root/arch/mips
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2020-06-18 19:47:46 +0300
committerPetr Mladek <pmladek@suse.com>2020-06-25 15:20:13 +0300
commit4fc29e63cc44fe1486b4d8037370a7d74db28999 (patch)
treefcdaf255d89c5c5f52ba5209a1cb22ee0a65cbe3 /arch/mips
parent5c2fb57af0f42550eb718a3b0b445c81ec923895 (diff)
downloadlinux-4fc29e63cc44fe1486b4d8037370a7d74db28999.tar.xz
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
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/fw/arc/arc_con.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/mips/fw/arc/arc_con.c b/arch/mips/fw/arc/arc_con.c
index 365e3913231e..7fdce236b298 100644
--- a/arch/mips/fw/arc/arc_con.c
+++ b/arch/mips/fw/arc/arc_con.c
@@ -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 = {