Skip to content

Commit f26f719

Browse files
Asbjørn Sloth Tønnesendavem330
Asbjørn Sloth Tønnesen
authored andcommitted
net: qede: use return from qede_parse_actions()
When calling qede_parse_actions() then the return code was only used for a non-zero check, and then -EINVAL was returned. qede_parse_actions() can currently fail with: * -EINVAL * -EOPNOTSUPP This patch changes the code to use the actual return code, not just return -EINVAL. The blaimed commit broke the implicit assumption that only -EINVAL would ever be returned. Only compile tested. Fixes: 319a1d1 ("flow_offload: check for basic action hw stats type") Signed-off-by: Asbjørn Sloth Tønnesen <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 27b4441 commit f26f719

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/net/ethernet/qlogic/qede/qede_filter.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1894,10 +1894,9 @@ int qede_add_tc_flower_fltr(struct qede_dev *edev, __be16 proto,
18941894
}
18951895

18961896
/* parse tc actions and get the vf_id */
1897-
if (qede_parse_actions(edev, &f->rule->action, f->common.extack)) {
1898-
rc = -EINVAL;
1897+
rc = qede_parse_actions(edev, &f->rule->action, f->common.extack);
1898+
if (rc)
18991899
goto unlock;
1900-
}
19011900

19021901
if (qede_flow_find_fltr(edev, &t)) {
19031902
rc = -EEXIST;

0 commit comments

Comments
 (0)