lkml.org 
[lkml]   [2006]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] moxa: remove pointless check of 'tty' argument vs NULL
On 15/05/06, Alan Cox <alan@redhat.com> wrote:
> On Mon, May 15, 2006 at 11:57:35PM +0200, Jesper Juhl wrote:
> > Remove pointless check of 'tty' argument vs NULL from moxa driver.
>
> Can you leave those in for the moment but change them to BUG_ON() because
> I've seen the pop up once or twice. They may be fixed but Im not 100% sure
> yet.
>

I could, but would that really make sense?

As Alexey pointed out in the previous thread :

> ->write() is called via
>
> tty->driver->write(tty, ...);
>
> See? tty was already dereferenced.

And besides, we wouldn't ever get to the BUG_ON() because even if the
function did manage to get called it would then explode in the
struct mxser_struct *info = tty->driver_data;
assignment, before it ever got to the BUG_ON() (that assignment could
ofcourse be moved as I did in my original patch, but that still leaves
Alexeys point in place).

--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-05-16 00:11    [W:0.233 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site