Re: potential-null-pointer-dereference-in-amiga-serial-driver.patchadded to -mm tree

From: Julien TINNES
Date: Thu Jun 09 2005 - 04:34:42 EST



> OK - so better just remove the check. Julien, care to follow Greg's
> recommendation and refresh the patch?

Here it is.


--
Julien TINNES
--- linux-2.6.11.orig/drivers/char/amiserial.c 2005-05-17 10:55:03.000000000 +0200
+++ linux-2.6.11/drivers/char/amiserial.c 2005-06-09 11:29:04.000000000 +0200
@@ -867,7 +867,7 @@
if (serial_paranoia_check(info, tty->name, "rs_put_char"))
return;

- if (!tty || !info->xmit.buf)
+ if (!info->xmit.buf)
return;

local_irq_save(flags);
@@ -916,7 +916,7 @@
if (serial_paranoia_check(info, tty->name, "rs_write"))
return 0;

- if (!tty || !info->xmit.buf || !tmp_buf)
+ if (!info->xmit.buf || !tmp_buf)
return 0;

local_save_flags(flags);