Skip to content

Commit

Permalink
NET: wan/x25, fix ldisc->open retval
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Nov 29, 2010
1 parent 7f90cfc commit 6a20bd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wan/x25_asy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}


Expand Down

0 comments on commit 6a20bd4

Please sign in to comment.