From: Jiri Slaby Date: Wed, 24 Nov 2010 23:27:55 +0000 (+0100) Subject: NET: wan/x25, fix ldisc->open retval X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6a20bd45fda271bd57e3ba41b3de3009797f4b5e;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.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 d81ad8397885..66cda25aaa26 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; }