diff options
author | YueHaibing <yuehaibing@huawei.com> | 2018-11-19 13:48:19 +0100 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2018-12-20 20:54:27 +0100 |
commit | cd0d465bb697a9c7bf66a9fe940f7981232f1676 (patch) | |
tree | d44c0916a1a82c9e29a4b8583d5d936ec5c56800 /drivers/net/ethernet/intel/e100.c | |
parent | Documentation: igb: Add a section about CBS (diff) | |
download | linux-cd0d465bb697a9c7bf66a9fe940f7981232f1676.tar.xz linux-cd0d465bb697a9c7bf66a9fe940f7981232f1676.zip |
e100: Fix passing zero to 'PTR_ERR' warning in e100_load_ucode_wait
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: YueHaibing <yuehaibing@huawei.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/e100.c')
-rw-r--r-- | drivers/net/ethernet/intel/e100.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c index 5e5c57db0d3f..0fd268070fb4 100644 --- a/drivers/net/ethernet/intel/e100.c +++ b/drivers/net/ethernet/intel/e100.c @@ -1345,8 +1345,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, |