rionet: fix NULL pointer dereference in rionet_remove
authorYinglin Luan <synmyth@gmail.com>
Sat, 25 Jun 2011 18:12:12 +0000 (18:12 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Jun 2011 12:57:35 +0000 (05:57 -0700)
commit55caa9241ece1c07a930e3d05a624061adcf2653
tree58747dba1d8c7711f8187216d1e433841bcd91ad
parent7ab24bfdf9a9a9f87ac8e5ad9a25f80b5b947be7
rionet: fix NULL pointer dereference in rionet_remove

Function rionet_remove initializes local variable 'ndev' to NULL
and do nothing changes before the call to unregister_netdev(ndev),
this could cause a NULL pointer dereference.

Reported-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Yinglin Luan <synmyth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/rionet.c