]> git.ipfire.org Git - thirdparty/linux.git/commit
rtase: Fix a check for error in rtase_alloc_msix()
authorDan Carpenter <dan.carpenter@linaro.org>
Wed, 8 Jan 2025 09:15:53 +0000 (12:15 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 9 Jan 2025 16:22:05 +0000 (08:22 -0800)
commit2055272e3ae01a954e41a5afb437c5d76f758e0b
tree6fc76c4c5ebf29d2c40b13f296bf4ecab1770ad2
parent426046e2d62dd19533808661e912b8e8a9eaec16
rtase: Fix a check for error in rtase_alloc_msix()

The pci_irq_vector() function never returns zero.  It returns negative
error codes or a positive non-zero IRQ number.  Fix the error checking to
test for negatives.

Fixes: a36e9f5cfe9e ("rtase: Add support for a pci table in this module")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Link: https://patch.msgid.link/f2ecc88d-af13-4651-9820-7cc665230019@stanley.mountain
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/realtek/rtase/rtase_main.c