Skip to content

Commit f85956b

Browse files
andy-shevpmladek
authored andcommitted
serial: sunsab: 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: David S. Miller <davem@davemloft.net> Signed-off-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20200618164751.56828-3-andriy.shevchenko@linux.intel.com
1 parent 4fc29e6 commit f85956b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/tty/serial/sunsab.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ static int sunsab_console_setup(struct console *con, char *options)
886886
* though...
887887
*/
888888
if (up->port.type != PORT_SUNSAB)
889-
return -1;
889+
return -EINVAL;
890890

891891
printk("Console: ttyS%d (SAB82532)\n",
892892
(sunsab_reg.minor - 64) + con->index);

0 commit comments

Comments
 (0)