public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: [PATCH] x25_asy: Fix ref count rule violation
Date: Fri, 8 Feb 2008 15:29:02 +0000	[thread overview]
Message-ID: <20080208152902.41eabc23@core> (raw)

x25_asy does not take an ldisc reference before calling the flush method.
Fix it to use the helper function we provide.

Signed-off-by: Alan Cox <alan@redhat.com>

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.24-mm1/drivers/net/wan/x25_asy.c linux-2.6.24-mm1/drivers/net/wan/x25_asy.c
--- linux.vanilla-2.6.24-mm1/drivers/net/wan/x25_asy.c	2008-02-06 14:13:27.000000000 +0000
+++ linux-2.6.24-mm1/drivers/net/wan/x25_asy.c	2008-02-06 14:34:55.000000000 +0000
@@ -554,6 +554,7 @@
 static int x25_asy_open_tty(struct tty_struct *tty)
 {
 	struct x25_asy *sl = (struct x25_asy *) tty->disc_data;
+	struct tty_ldisc *ld;
 	int err;
 
 	/* First make sure we're not already connected. */
@@ -572,9 +573,7 @@
 	if (tty->driver->flush_buffer)  {
 		tty->driver->flush_buffer(tty);
 	}
-	if (tty->ldisc.flush_buffer)  {
-		tty->ldisc.flush_buffer(tty);
-	}
+	tty_ldisc_flush(tty);
 
 	/* Restore default settings */
 	sl->dev->type = ARPHRD_X25;

                 reply	other threads:[~2008-02-08 15:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20080208152902.41eabc23@core \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@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