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 <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Petr Mladek <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 4fc29e6 commit f85956b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)