Skip to content
Snippets Groups Projects
Commit 0d4420a9 authored by Oliver Hartkopp's avatar Oliver Hartkopp Committed by David S. Miller
Browse files

slcan: fix ldisc->open retval


TTY layer expects 0 if the ldisc->open operation succeeded.

Reported-by: default avatarMatvejchikov Ilya <matvejchikov@gmail.com>
Signed-off-by: default avatarOliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent aae1e743
No related branches found
No related tags found
No related merge requests found
...@@ -583,7 +583,9 @@ static int slcan_open(struct tty_struct *tty) ...@@ -583,7 +583,9 @@ static int slcan_open(struct tty_struct *tty)
/* Done. We have linked the TTY line to a channel. */ /* Done. We have linked the TTY line to a channel. */
rtnl_unlock(); rtnl_unlock();
tty->receive_room = 65536; /* We don't flow control */ tty->receive_room = 65536; /* We don't flow control */
return sl->dev->base_addr;
/* TTY layer expects 0 on success */
return 0;
err_free_chan: err_free_chan:
sl->tty = NULL; sl->tty = NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment