]> git.baikalelectronics.ru Git - kernel.git/commit
be2net: Free/delete pmacs (in be_clear()) only if they exist
authorSomnath Kotur <somnath.kotur@emulex.com>
Thu, 5 Dec 2013 06:38:16 +0000 (12:08 +0530)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 Dec 2013 20:03:40 +0000 (15:03 -0500)
commit002a93b58a25a02be6b498d5513591a4adf954a6
tree95a9a5f6e67ae6361f16f88297348c9874578231
parent90fcb40a066a74d8c3476b281d1dc4d99bbacde1
be2net: Free/delete pmacs (in be_clear()) only if they exist

During suspend-resume and lancer error recovery we will cleanup and
re-initialize the resources through be_clear() and be_setup() respectively.
During re-initialisation in be_setup(), if be_get_config() fails, we'll again
call be_clear() which will cause a NULL pointer dereference as adapter->pmac_id is
already freed.

Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com>
Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be_main.c