提交 62baaf34 编写于 作者: J Jesper Juhl 提交者: Jiri Kosina

qlogic: get rid of a redundant test for NULL before call to release_firmware()

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: NJesper Juhl <jj@chaosbits.net>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 294ca868
......@@ -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;
}
......
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册