From: Greg Kroah-Hartman <gregkh@suse.de>
To: linux-kernel@vger.kernel.org
Cc: Jiri Slaby <jslaby@suse.cz>, Alan Cox <alan@linux.intel.com>,
Andrew Hendry <andrew.hendry@gmail.com>,
linux-x25@vger.kernel.org, Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 3/6] NET: wan/x25, fix ldisc->open retval
Date: Thu, 2 Dec 2010 13:08:20 -0800 [thread overview]
Message-ID: <1291324103-7054-3-git-send-email-gregkh@suse.de> (raw)
In-Reply-To: <20101202204827.GB5927@kroah.com>
From: Jiri Slaby <jslaby@suse.cz>
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 <jslaby@suse.cz>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Andrew Hendry <andrew.hendry@gmail.com>
Cc: linux-x25@vger.kernel.org
Tested-by: Sergey Lapin <slapin@ossfans.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
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
next prev parent reply other threads:[~2010-12-02 21:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-02 20:48 [GIT PATCH] TTY/serial fixes for .37-rc4 Greg KH
2010-12-02 21:08 ` [PATCH 1/6] serial8250: Mark console as CON_ANYTIME Greg Kroah-Hartman
2010-12-02 21:08 ` [PATCH 2/6] TTY: ldisc, fix open flag handling Greg Kroah-Hartman
2010-12-02 21:08 ` Greg Kroah-Hartman [this message]
2010-12-02 21:08 ` [PATCH 4/6] TTY: don't allow reopen when ldisc is changing Greg Kroah-Hartman
2010-12-02 21:08 ` [PATCH 5/6] TTY: open/hangup race fixup Greg Kroah-Hartman
2010-12-02 21:08 ` [PATCH 6/6] serial: mfd: adjust the baud rate setting Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1291324103-7054-3-git-send-email-gregkh@suse.de \
--to=gregkh@suse.de \
--cc=alan@linux.intel.com \
--cc=andrew.hendry@gmail.com \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-x25@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome