aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Hartkopp <socketcan@hartkopp.net>2011-05-10 13:12:30 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2011-05-21 15:13:18 -0700
commitda7f9c20fda9b1775def5b4087c51169e13cc0c4 (patch)
treee1efa7780494b2ac5d5312641e5e5d0acb509704
parent8970cb9186550711878378d7091f64b177d350d9 (diff)
downloadlinux-linaro-android-da7f9c20fda9b1775def5b4087c51169e13cc0c4.tar.gz
slcan: fix ldisc->open retval
commit 0d4420a90b51abdea71585f571bad6d789ff8eb7 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/net/can/slcan.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c
index b423965a78d..1b49df6b247 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)
/* Done. We have linked the TTY line to a channel. */
rtnl_unlock();
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:
sl->tty = NULL;