Pārlūkot izejas kodu

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>
Oliver Hartkopp 14 gadi atpakaļ
vecāks
revīzija
0d4420a90b
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 3 1
      drivers/net/can/slcan.c

+ 3 - 1
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;