Commit 7c3ab312 authored by YueHaibing's avatar YueHaibing Committed by Kleber Sacilotto de Souza

e100: Fix passing zero to 'PTR_ERR' warning in e100_load_ucode_wait

BugLink: https://bugs.launchpad.net/bugs/1858489

[ Upstream commit cd0d465b ]

Fix a static code checker warning:
drivers/net/ethernet/intel/e100.c:1349
 e100_load_ucode_wait() warn: passing zero to 'PTR_ERR'
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarConnor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent e2b27d60
......@@ -1370,8 +1370,8 @@ static inline int e100_load_ucode_wait(struct nic *nic)
fw = e100_request_firmware(nic);
/* If it's NULL, then no ucode is required */
if (!fw || IS_ERR(fw))
return PTR_ERR(fw);
if (IS_ERR_OR_NULL(fw))
return PTR_ERR_OR_ZERO(fw);
if ((err = e100_exec_cb(nic, (void *)fw, e100_setup_ucode)))
netif_err(nic, probe, nic->netdev,
......
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