]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
slcan: fix ldisc->open retval
authorOliver Hartkopp <socketcan@hartkopp.net>
Tue, 10 May 2011 20:12:30 +0000 (13:12 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 10 May 2011 22:04:07 +0000 (15:04 -0700)
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>
drivers/net/can/slcan.c

index b423965a78d16fe702ddbba08d7dd8d529cdf767..1b49df6b2470874b0cb76cf45214f247c6d3bf29 100644 (file)
@@ -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;