net/enic: fix crash when releasing queues
authorJohn Daley <johndale@cisco.com>
Sat, 11 Jun 2016 17:27:04 +0000 (10:27 -0700)
committerBruce Richardson <bruce.richardson@intel.com>
Mon, 20 Jun 2016 15:21:49 +0000 (17:21 +0200)
commit83a9d8b7eb06a9a5f99cbe3b529f736077c9a826
treee02b1abb2ed5581133665f88ff6091ce1e890a6e
parent6046898f509732bed5186d8cdfc4502678019b2d
net/enic: fix crash when releasing queues

If device configuration failed due to a lack of resources, such as
if more queues are requested than are available, the queue release
functions are called with NULL pointers which were being dereferenced.

Skip releasing queues if they are NULL pointers.

Fixes: fefed3d1e62c ("enic: new driver")

Signed-off-by: John Daley <johndale@cisco.com>
drivers/net/enic/enic_main.c