Skip to content

Commit

Permalink
qlogic: get rid of a redundant test for NULL before call to release_f…
Browse files Browse the repository at this point in the history
…irmware()

Since release_firmware() deals gracefully with being passed a NULL
pointer there is no reason to test explicitly before calling the
function.

Signed-off-by: Jesper Juhl <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
  • Loading branch information
jjuhl authored and Jiri Kosina committed Apr 30, 2012
1 parent 294ca86 commit 62baaf3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1261,8 +1261,7 @@ void netxen_request_firmware(struct netxen_adapter *adapter)
void
netxen_release_firmware(struct netxen_adapter *adapter)
{
if (adapter->fw)
release_firmware(adapter->fw);
release_firmware(adapter->fw);
adapter->fw = NULL;
}

Expand Down
3 changes: 1 addition & 2 deletions drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1321,8 +1321,7 @@ void qlcnic_request_firmware(struct qlcnic_adapter *adapter)
void
qlcnic_release_firmware(struct qlcnic_adapter *adapter)
{
if (adapter->fw)
release_firmware(adapter->fw);
release_firmware(adapter->fw);
adapter->fw = NULL;
}

Expand Down

0 comments on commit 62baaf3

Please sign in to comment.