igc: Fix passing 0 to ERR_PTR in igc_xdp_run_prog()
authorYue Haibing <yuehaibing@huawei.com>
Mon, 6 Jan 2025 22:19:16 +0000 (14:19 -0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 8 Jan 2025 02:15:51 +0000 (18:15 -0800)
commit8b6237e1f4d405737237882a19ee5f316763dff7
treef82aca38327789a2638b7f2cc25e19e6e05f3605
parent484d3675f2aa7710a4092411a203b719486e8666
igc: Fix passing 0 to ERR_PTR in igc_xdp_run_prog()

igc_xdp_run_prog() converts customed xdp action to a negative error code
with the sk_buff pointer type which be checked with IS_ERR in
igc_clean_rx_irq(). Remove this error pointer handing instead use plain
int return value to fix this smatch warnings:

drivers/net/ethernet/intel/igc/igc_main.c:2533
 igc_xdp_run_prog() warn: passing zero to 'ERR_PTR'

Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Avigail Dahan <avigailx.dahan@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Link: https://patch.msgid.link/20250106221929.956999-9-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/intel/igc/igc_main.c