diff options
author | Dan Carpenter <dan.carpenter@linaro.org> | 2025-02-13 09:31:41 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2025-02-15 04:18:00 +0300 |
commit | c2ddb619fa8d535af968965181656c20a6de3f81 (patch) | |
tree | 1264f1e086c46c5b919c2000584acebd330eff14 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | de38503b74e28c47e28ed800d2a8d12c713b2c63 (diff) | |
download | linux-c2ddb619fa8d535af968965181656c20a6de3f81.tar.xz |
ice: Fix signedness bug in ice_init_interrupt_scheme()
If pci_alloc_irq_vectors() can't allocate the minimum number of vectors
then it returns -ENOSPC so there is no need to check for that in the
caller. In fact, because pf->msix.min is an unsigned int, it means that
any negative error codes are type promoted to high positive values and
treated as success. So here, the "return -ENOMEM;" is unreachable code.
Check for negatives instead.
Now that we're only dealing with error codes, it's easier to propagate
the error code from pci_alloc_irq_vectors() instead of hardcoding
-ENOMEM.
Fixes: 79d97b8cf9a8 ("ice: remove splitting MSI-X between features")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Link: https://patch.msgid.link/b16e4f01-4c85-46e2-b602-fce529293559@stanley.mountain
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions