diff options
author | Oliver Hartkopp <socketcan@hartkopp.net> | 2011-05-10 16:12:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-10 18:04:07 -0400 |
commit | 0d4420a90b51abdea71585f571bad6d789ff8eb7 (patch) | |
tree | 5c76c689b532980aed79d171a3547d6001a47687 /drivers/net/can/slcan.c | |
parent | aae1e743fee2b5523fb31ee050295f062cb26a31 (diff) |
slcan: fix ldisc->open retval
TTY layer expects 0 if the ldisc->open operation succeeded.
Reported-by: Matvejchikov Ilya <matvejchikov@gmail.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/can/slcan.c')
-rw-r--r-- | drivers/net/can/slcan.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c index b423965a78d1..1b49df6b2470 100644 --- a/drivers/net/can/slcan.c +++ b/drivers/net/can/slcan.c | |||
@@ -583,7 +583,9 @@ static int slcan_open(struct tty_struct *tty) | |||
583 | /* Done. We have linked the TTY line to a channel. */ | 583 | /* Done. We have linked the TTY line to a channel. */ |
584 | rtnl_unlock(); | 584 | rtnl_unlock(); |
585 | tty->receive_room = 65536; /* We don't flow control */ | 585 | tty->receive_room = 65536; /* We don't flow control */ |
586 | return sl->dev->base_addr; | 586 | |
587 | /* TTY layer expects 0 on success */ | ||
588 | return 0; | ||
587 | 589 | ||
588 | err_free_chan: | 590 | err_free_chan: |
589 | sl->tty = NULL; | 591 | sl->tty = NULL; |