Commit ec5c50cb authored by Dhananjay Phadke's avatar Dhananjay Phadke Committed by David S. Miller

netxen: fix file firmware leak

Release file firmware when no firmware reset is required.
Signed-off-by: default avatarDhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ea6828b8
...@@ -817,7 +817,7 @@ netxen_start_firmware(struct netxen_adapter *adapter) ...@@ -817,7 +817,7 @@ netxen_start_firmware(struct netxen_adapter *adapter)
if (err < 0) if (err < 0)
goto err_out; goto err_out;
if (err == 0) if (err == 0)
goto wait_init; goto ready;
if (first_boot != 0x55555555) { if (first_boot != 0x55555555) {
NXWR32(adapter, CRB_CMDPEG_STATE, 0); NXWR32(adapter, CRB_CMDPEG_STATE, 0);
...@@ -860,6 +860,7 @@ netxen_start_firmware(struct netxen_adapter *adapter) ...@@ -860,6 +860,7 @@ netxen_start_firmware(struct netxen_adapter *adapter)
| (_NETXEN_NIC_LINUX_SUBVERSION); | (_NETXEN_NIC_LINUX_SUBVERSION);
NXWR32(adapter, CRB_DRIVER_VERSION, val); NXWR32(adapter, CRB_DRIVER_VERSION, val);
ready:
NXWR32(adapter, NX_CRB_DEV_STATE, NX_DEV_READY); NXWR32(adapter, NX_CRB_DEV_STATE, NX_DEV_READY);
wait_init: wait_init:
...@@ -874,7 +875,7 @@ netxen_start_firmware(struct netxen_adapter *adapter) ...@@ -874,7 +875,7 @@ netxen_start_firmware(struct netxen_adapter *adapter)
netxen_check_options(adapter); netxen_check_options(adapter);
return 0; /* fall through and release firmware */
err_out: err_out:
netxen_release_firmware(adapter); netxen_release_firmware(adapter);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment