X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fcxgbe%2Fclip_tbl.c;h=a0ab2a6ac82e8a644a5c19c72d0ceb23f352bc16;hb=b389a7888ed2f12f4a885bd7e6b7271e3238ee1a;hp=fa5281cd4d3c923516e77acad4ca15a87ba25f39;hpb=3f2c1e209cfcccedcf3c5de2248daffd90f42626;p=dpdk.git diff --git a/drivers/net/cxgbe/clip_tbl.c b/drivers/net/cxgbe/clip_tbl.c index fa5281cd4d..a0ab2a6ac8 100644 --- a/drivers/net/cxgbe/clip_tbl.c +++ b/drivers/net/cxgbe/clip_tbl.c @@ -3,7 +3,7 @@ * All rights reserved. */ -#include "common.h" +#include "base/common.h" #include "clip_tbl.h" /** @@ -105,7 +105,7 @@ static struct clip_entry *t4_clip_alloc(struct rte_eth_dev *dev, struct adapter *adap = ethdev2adap(dev); struct clip_tbl *ctbl = adap->clipt; struct clip_entry *ce; - int ret; + int ret = 0; if (!ctbl) return NULL; @@ -120,12 +120,10 @@ static struct clip_entry *t4_clip_alloc(struct rte_eth_dev *dev, ce->type = FILTER_TYPE_IPV6; rte_atomic32_set(&ce->refcnt, 1); ret = clip6_get_mbox(dev, lip); - if (ret) { + if (ret) dev_debug(adap, "CLIP FW ADD CMD failed: %d", ret); - ce = NULL; - } } else { ce->type = FILTER_TYPE_IPV4; } @@ -136,7 +134,7 @@ static struct clip_entry *t4_clip_alloc(struct rte_eth_dev *dev, } t4_os_write_unlock(&ctbl->lock); - return ce; + return ret ? NULL : ce; } /**