From: Oliver Hartkopp Date: Tue, 10 May 2011 20:12:30 +0000 (-0700) Subject: slcan: fix ldisc->open retval X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0d4420a90b51abdea71585f571bad6d789ff8eb7;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git slcan: fix ldisc->open retval TTY layer expects 0 if the ldisc->open operation succeeded. Reported-by: Matvejchikov Ilya Signed-off-by: Oliver Hartkopp Signed-off-by: David S. Miller --- 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) /* 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;