From: Greg Kroah-Hartman Subject: [PATCH 3/6] NET: wan/x25, fix ldisc->open retval Date: Thu, 2 Dec 2010 13:08:20 -0800 Message-ID: <1291324103-7054-3-git-send-email-gregkh@suse.de> References: <20101202204827.GB5927@kroah.com> Return-path: In-Reply-To: <20101202204827.GB5927@kroah.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-kernel@vger.kernel.org Cc: Jiri Slaby , Alan Cox , Andrew Hendry , linux-x25@vger.kernel.org, Greg Kroah-Hartman From: Jiri Slaby 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 --- drivers/net/wan/x25_asy.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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; } -- 1.7.1