Skip to content
Snippets Groups Projects
Commit 37e31d2d authored by Dan Carpenter's avatar Dan Carpenter Committed by Jason Gunthorpe
Browse files

i40iw: Fix error handling in i40iw_manage_arp_cache()

The i40iw_arp_table() function can return -EOVERFLOW if
i40iw_alloc_resource() fails so we can't just test for "== -1".

Fixes: 4e9042e6 ("i40iw: add hw and utils files")
Link: https://lore.kernel.org/r/20200422092211.GA195357@mwanda


Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarShiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 0e698dfa
No related branches found
No related tags found
No related merge requests found
...@@ -534,7 +534,7 @@ void i40iw_manage_arp_cache(struct i40iw_device *iwdev, ...@@ -534,7 +534,7 @@ void i40iw_manage_arp_cache(struct i40iw_device *iwdev,
int arp_index; int arp_index;
arp_index = i40iw_arp_table(iwdev, ip_addr, ipv4, mac_addr, action); arp_index = i40iw_arp_table(iwdev, ip_addr, ipv4, mac_addr, action);
if (arp_index == -1) if (arp_index < 0)
return; return;
cqp_request = i40iw_get_cqp_request(&iwdev->cqp, false); cqp_request = i40iw_get_cqp_request(&iwdev->cqp, false);
if (!cqp_request) if (!cqp_request)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment