Although it is rather unlikely getting 0 as the descriptor handle, better
to contemplate that possibility.
Coverity issue: 195018
Fixes:
896c265ef954 ("net/nfp: use new CPP interface")
Cc: stable@dpdk.org
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
PMD_DRV_LOG(DEBUG, "Trying with fw file: %s", fw_name);
fw_f = open(fw_name, O_RDONLY);
- if (fw_f > 0)
+ if (fw_f >= 0)
goto read_fw;
/* Then try the PCI name */
PMD_DRV_LOG(DEBUG, "Trying with fw file: %s", fw_name);
fw_f = open(fw_name, O_RDONLY);
- if (fw_f > 0)
+ if (fw_f >= 0)
goto read_fw;
/* Finally try the card type and media */