Thread (6 messages) 6 messages, 3 authors, 2020-09-02

[dpdk-dev] [PATCH] net/bnxt: remove redundant null check in bnxt_validate_and_parse_flow_type

From: Gaurav Singh <hidden>
Date: 2020-08-06 03:51:00
Subsystem: networking drivers, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

vxlan_spec cannot be NULL since its already being accessed
before. Remove the redundant NULL check.

Signed-off-by: Gaurav Singh <redacted>
---
 drivers/net/bnxt/bnxt_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index 320b53d94..c1c59bbe5 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -554,7 +554,7 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp,
 			}
 
 			/* Check if VNI is masked. */
-			if (vxlan_spec && vxlan_mask) {
+			if (vxlan_mask != NULL) {
 				vni_masked =
 					!!memcmp(vxlan_mask->vni, vni_mask,
 						 RTE_DIM(vni_mask));
-- 
2.17.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help