Skip to content

Commit cd0d465

Browse files
YueHaibingJeff Kirsher
authored andcommitted
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 <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent bad87ee commit cd0d465

File tree

1 file changed

+2
-2
lines changed
  • drivers/net/ethernet/intel

1 file changed

+2
-2
lines changed

drivers/net/ethernet/intel/e100.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,8 +1345,8 @@ static inline int e100_load_ucode_wait(struct nic *nic)
13451345

13461346
fw = e100_request_firmware(nic);
13471347
/* If it's NULL, then no ucode is required */
1348-
if (!fw || IS_ERR(fw))
1349-
return PTR_ERR(fw);
1348+
if (IS_ERR_OR_NULL(fw))
1349+
return PTR_ERR_OR_ZERO(fw);
13501350

13511351
if ((err = e100_exec_cb(nic, (void *)fw, e100_setup_ucode)))
13521352
netif_err(nic, probe, nic->netdev,

0 commit comments

Comments
 (0)