Skip to content

Commit

Permalink
serial: sunsab: 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: 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
  • Loading branch information
Andy Shevchenko authored and Petr Mladek committed Jun 25, 2020
1 parent 4fc29e6 commit f85956b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/serial/sunsab.c
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ static int sunsab_console_setup(struct console *con, char *options)
* though...
*/
if (up->port.type != PORT_SUNSAB)
return -1;
return -EINVAL;

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

0 comments on commit f85956b

Please sign in to comment.