atl1: fix resume
authorLuca Tettamanti <kronos.it@gmail.com>
Wed, 22 Sep 2010 10:41:58 +0000 (10:41 +0000)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 6 Jan 2011 23:08:12 +0000 (18:08 -0500)
commitcc0d092e92438e632df7354f16656b20b3a32931
treeb7e5daf06a5de5b83ea10d562fb2f3adad35abad
parent5abe67cec849afb10f065f859799a4e3384dcf9f
atl1: fix resume

commit ec5a32f67c603b11d68eb283d94eb89a4f6cfce1 upstream.

adapter->cmb.cmb is initialized when the device is opened and freed when
it's closed. Accessing it unconditionally during resume results either
in a crash (NULL pointer dereference, when the interface has not been
opened yet) or data corruption (when the interface has been used and
brought down adapter->cmb.cmb points to a deallocated memory area).

Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
Acked-by: Chris Snook <chris.snook@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
drivers/net/atlx/atl1.c