Re: [PATCH] missing NULL check in drivers/char/n_tty.c

From: Andrew Morton
Date: Mon Jun 21 2004 - 02:02:36 EST


Dan Aloni <da-x@xxxxxxx> wrote:
>
> The rest of the kernel treats tty->driver->chars_in_buffer as a possible
> NULL. This patch changes normal_poll() to be consistent with the rest of
> the code.

It would be better to change the rest of the kernel - remove the tests.

If any driver fails to implement ->chars_in_buffer() then we get a nice
oops which tells us that driver needs a stub handler.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/