提交 92425c40 编写于 作者: D Dan Carpenter 提交者: David S. Miller

bnxt_en: Uninitialized variable in bnxt_tc_parse_actions()

Smatch warns that:

    drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c:160 bnxt_tc_parse_actions()
    error: uninitialized symbol 'rc'.

"rc" is either uninitialized or set to zero here so we can just remove
the check.

Fixes: 8c95f773 ("bnxt_en: add support for Flower based vxlan encap/decap offload")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NMichael Chan <michael.chan@broadcom.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b9f24204
...@@ -148,9 +148,6 @@ static int bnxt_tc_parse_actions(struct bnxt *bp, ...@@ -148,9 +148,6 @@ static int bnxt_tc_parse_actions(struct bnxt *bp,
} }
} }
if (rc)
return rc;
if (actions->flags & BNXT_TC_ACTION_FLAG_FWD) { if (actions->flags & BNXT_TC_ACTION_FLAG_FWD) {
if (actions->flags & BNXT_TC_ACTION_FLAG_TUNNEL_ENCAP) { if (actions->flags & BNXT_TC_ACTION_FLAG_TUNNEL_ENCAP) {
/* dst_fid is PF's fid */ /* dst_fid is PF's fid */
...@@ -164,7 +161,7 @@ static int bnxt_tc_parse_actions(struct bnxt *bp, ...@@ -164,7 +161,7 @@ static int bnxt_tc_parse_actions(struct bnxt *bp,
} }
} }
return rc; return 0;
} }
#define GET_KEY(flow_cmd, key_type) \ #define GET_KEY(flow_cmd, key_type) \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册