The patch titled Char: synclink, remove unnecessary checks has been added to the -mm tree. Its filename is char-synclink-remove-unnecessary-checks.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: Char: synclink, remove unnecessary checks From: Jiri Slaby <jslaby@xxxxxxx> Stanse found a potential null dereference in mgsl_put_char and mgsl_write. There is a check for tty being NULL, but it is dereferenced earlier. Actually, tty cannot be NULL in .write and .put_char, so remove the tests. Signed-off-by: Jiri Slaby <jslaby@xxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxx> Cc: Alan Cox <alan@xxxxxxxxxxxxxxx> Cc: Paul Fulghum <paulkf@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/char/synclink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -puN drivers/char/synclink.c~char-synclink-remove-unnecessary-checks drivers/char/synclink.c --- a/drivers/char/synclink.c~char-synclink-remove-unnecessary-checks +++ a/drivers/char/synclink.c @@ -2031,7 +2031,7 @@ static int mgsl_put_char(struct tty_stru if (mgsl_paranoia_check(info, tty->name, "mgsl_put_char")) return 0; - if (!tty || !info->xmit_buf) + if (!info->xmit_buf) return 0; spin_lock_irqsave(&info->irq_spinlock, flags); @@ -2121,7 +2121,7 @@ static int mgsl_write(struct tty_struct if (mgsl_paranoia_check(info, tty->name, "mgsl_write")) goto cleanup; - if (!tty || !info->xmit_buf) + if (!info->xmit_buf) goto cleanup; if ( info->params.mode == MGSL_MODE_HDLC || _ Patches currently in -mm which might be from jslaby@xxxxxxx are linux-next.patch media-dvb-siano-fix-memory-leak.patch media-video-tuner-core-fix-memory-leak.patch infiniband-use-rlimit-helpers.patch char-synclink-remove-unnecessary-checks.patch mm-use-rlimit-helpers.patch fs-use-rlimit-helpers.patch ipc-use-rlimit-helpers.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html