Skip to content

Commit fcee206

Browse files
Asbjørn Sloth Tønnesendavem330
authored andcommitted
net: qede: use return from qede_parse_flow_attr() for flower
In qede_add_tc_flower_fltr(), when calling qede_parse_flow_attr() then the return code was only used for a non-zero check, and then -EINVAL was returned. qede_parse_flow_attr() can currently fail with: * -EINVAL * -EOPNOTSUPP * -EPROTONOSUPPORT This patch changes the code to use the actual return code, not just return -EINVAL. The blaimed commit introduced these functions. Only compile tested. Fixes: 2ce9c93 ("qede: Ingress tc flower offload (drop action) support.") Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent e257144 commit fcee206

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

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

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

18811881
/* parse flower attribute and prepare filter */
1882-
if (qede_parse_flow_attr(edev, proto, f->rule, &t)) {
1883-
rc = -EINVAL;
1882+
rc = qede_parse_flow_attr(edev, proto, f->rule, &t);
1883+
if (rc)
18841884
goto unlock;
1885-
}
18861885

18871886
/* Validate profile mode and number of filters */
18881887
if ((edev->arfs->filter_count && edev->arfs->mode != t.mode) ||

0 commit comments

Comments
 (0)