Skip to content

Commit 27b4441

Browse files
Asbjørn Sloth Tønnesendavem330
authored andcommitted
net: qede: use return from qede_parse_flow_attr() for flow_spec
In qede_flow_spec_to_rule(), 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 qede_flow_spec_to_rule(), and this call to qede_parse_flow_attr(), it looks like it just duplicated how it was already used. Only compile tested. Fixes: 37c5d3e ("qede: use ethtool_rx_flow_rule() to remove duplicated parser code") 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 fcee206 commit 27b4441

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
@@ -2002,10 +2002,9 @@ static int qede_flow_spec_to_rule(struct qede_dev *edev,
20022002
if (IS_ERR(flow))
20032003
return PTR_ERR(flow);
20042004

2005-
if (qede_parse_flow_attr(edev, proto, flow->rule, t)) {
2006-
err = -EINVAL;
2005+
err = qede_parse_flow_attr(edev, proto, flow->rule, t);
2006+
if (err)
20072007
goto err_out;
2008-
}
20092008

20102009
/* Make sure location is valid and filter isn't already set */
20112010
err = qede_flow_spec_validate(edev, &flow->rule->action, t,

0 commit comments

Comments
 (0)