Skip to content

Commit 08f8280

Browse files
skotur-brcmdavem330
authored andcommitted
bnxt: Avoid logging an unnecessary message when a flow can't be offloaded
For every single case where bnxt_tc_can_offload() can fail, we are logging a user friendly descriptive message anyway, but because of the path it would take in case of failure, another redundant error message would get logged. Just freeing the node and returning from the point of failure should suffice. Signed-off-by: Somnath Kotur <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 90f9062 commit 08f8280

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1406,7 +1406,8 @@ static int bnxt_tc_add_flow(struct bnxt *bp, u16 src_fid,
14061406

14071407
if (!bnxt_tc_can_offload(bp, flow)) {
14081408
rc = -EOPNOTSUPP;
1409-
goto free_node;
1409+
kfree_rcu(new_node, rcu);
1410+
return rc;
14101411
}
14111412

14121413
/* If a flow exists with the same cookie, delete it */

0 commit comments

Comments
 (0)