bnx2x: fix a crash on corrupt firmware file
authorMichal Schmidt <mschmidt@redhat.com>
Thu, 15 Mar 2012 14:08:28 +0000 (14:08 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Mar 2012 08:57:26 +0000 (01:57 -0700)
commit127d0a198a310970b31866af8bbb6d4b1068e546
tree4577367c5ea665a2f7ffd53eeef2c0409a2e7af5
parentcc34eb672eedb5ff248ac3bf9971a76f141fd141
bnx2x: fix a crash on corrupt firmware file

If the requested firmware is deemed corrupt and then released, reset the
pointer to NULL in order to avoid double-freeing it in
bnx2x_release_firmware() or dereferencing it in bnx2x_init_firmware().

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c