]> git.baikalelectronics.ru Git - kernel.git/commit
Avoid possible NULL pointer deref in 3c359 driver
authorJesper Juhl <jesper.juhl@gmail.com>
Sat, 29 Sep 2007 05:42:09 +0000 (22:42 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:53:51 +0000 (16:53 -0700)
commitfa63af86423228e44681afaa63571593dee5cf11
tree7fa3c9df43063f00474c1ca00066728cd3136c6a
parent5ed428a50c98af996dc87ac97fbc0505e7a5788b
Avoid possible NULL pointer deref in 3c359 driver

In xl_freemem(), if dev_if is NULL, the line

  struct xl_private *xl_priv =(struct xl_private *)dev->priv;

will cause a NULL pointer dereference.

(akpm: don't try to fix it: just delete the pointless test-for-null)

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/tokenring/3c359.c