DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <arybchenko@solarflare.com>
To: <dev@dpdk.org>
Subject: [dpdk-dev] [PATCH] net/sfc: remove logically dead code
Date: Tue, 18 Apr 2017 13:51:01 +0100	[thread overview]
Message-ID: <1492519861-7227-1-git-send-email-arybchenko@solarflare.com> (raw)

Coverity issue: 1419717
Fixes: a9825ccf5bb8 ("net/sfc: support flow API filters")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
---
 drivers/net/sfc/sfc_flow.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c
index 23cf379..c3ea43a 100644
--- a/drivers/net/sfc/sfc_flow.c
+++ b/drivers/net/sfc/sfc_flow.c
@@ -837,8 +837,7 @@ sfc_flow_parse_pattern(const struct rte_flow_item pattern[],
 		return -rte_errno;
 	}
 
-	for (; pattern != NULL &&
-	       pattern->type != RTE_FLOW_ITEM_TYPE_END; pattern++) {
+	for (; pattern->type != RTE_FLOW_ITEM_TYPE_END; pattern++) {
 		item = sfc_flow_get_item(pattern->type);
 		if (item == NULL) {
 			rte_flow_error_set(error, ENOTSUP,
@@ -868,13 +867,6 @@ sfc_flow_parse_pattern(const struct rte_flow_item pattern[],
 			prev_layer = item->layer;
 	}
 
-	if (pattern == NULL) {
-		rte_flow_error_set(error, EINVAL,
-				   RTE_FLOW_ERROR_TYPE_ITEM, NULL,
-				   "NULL item");
-		return -rte_errno;
-	}
-
 	return 0;
 }
 
-- 
2.7.4

             reply	other threads:[~2017-04-18 12:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-18 12:51 Andrew Rybchenko [this message]
2017-04-18 16:19 ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1492519861-7227-1-git-send-email-arybchenko@solarflare.com \
    --to=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).