From: Jiri Slaby Date: Wed, 24 Nov 2010 23:27:55 +0000 (+0100) Subject: NET: wan/x25, fix ldisc->open retval X-Git-Tag: v2.6.37-rc5~30^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6a20bd45fda271bd57e3ba41b3de3009797f4b5e;p=platform%2Fkernel%2Flinux-3.10.git NET: wan/x25, fix ldisc->open retval We should never return positive values from ldisc->open, tty layer doesn't (and never did) expect that. If we do that, weird things like warnings in tty_ldisc_close happen. Not sure if dev->base_addr is used somehow now. Signed-off-by: Jiri Slaby Cc: Alan Cox Cc: Andrew Hendry Cc: linux-x25@vger.kernel.org Tested-by: Sergey Lapin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c index d81ad83..66cda25 100644 --- a/drivers/net/wan/x25_asy.c +++ b/drivers/net/wan/x25_asy.c @@ -582,7 +582,7 @@ static int x25_asy_open_tty(struct tty_struct *tty) if (err) return err; /* Done. We have linked the TTY line to a channel. */ - return sl->dev->base_addr; + return 0; }