qlcnic: Fix NULL dereference in error path.
authorRajesh Borundia <rajesh.borundia@qlogic.com>
Tue, 2 Apr 2013 05:34:41 +0000 (05:34 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Apr 2013 18:27:11 +0000 (14:27 -0400)
commitf1a094a83059b4677038befde6c4da6cfed31dbd
tree7a0b3c9d14bfc01b1d44a43c061f925b6646d92f
parentd8fe3436df256ce48d953dc342ac114e6e368476
qlcnic: Fix NULL dereference in error path.

o Fix for smatch tool reported error
   drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c:2029
   qlcnic_probe() error: potential NULL dereference 'adapter'.
o While returning from an error path in probe, adapter is not
  initialized. So do not access adapter in cleanup path.

Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c