aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2017-11-02 11:15:07 +0000
committerDavid S. Miller <davem@davemloft.net>2017-11-03 14:23:54 +0900
commita882d20cdb7775ff8b4aac880255eff6a2c1c85e (patch)
tree3c989cdc375c1819f7cfe7136abdac5060e2e2fb /drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
parentbpf: fix out-of-bounds access warning in bpf_check (diff)
downloadlinux-dev-a882d20cdb7775ff8b4aac880255eff6a2c1c85e.tar.xz
linux-dev-a882d20cdb7775ff8b4aac880255eff6a2c1c85e.zip
cxgb4: fix error return code in cxgb4_set_hash_filter()
Fix to return a negative error code from thecxgb4_alloc_atid() error handling case instead of 0. Fixes: 12b276fbf6e0 ("cxgb4: add support to create hash filters") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Acked-By: Kumar Sanghvi <kumaras@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
index abab67d52edb..5980f308a253 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
@@ -1110,8 +1110,10 @@ static int cxgb4_set_hash_filter(struct net_device *dev,
}
atid = cxgb4_alloc_atid(t, f);
- if (atid < 0)
+ if (atid < 0) {
+ ret = atid;
goto free_smt;
+ }
iconf = adapter->params.tp.ingress_config;
if (iconf & VNIC_F) {