提交 d3ac9866 编写于 作者: V Vladimir Oltean 提交者: David S. Miller

net: mscc: ocelot: return directly in ocelot_cls_flower_{replace, destroy}

There is no need to check the "ret" variable, one can just return the
function result back to the caller.
Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: NHoratiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: NAllan W. Nielsen <allan.nielsen@microchip.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ce6659c5
......@@ -192,11 +192,7 @@ int ocelot_cls_flower_replace(struct ocelot *ocelot, int port,
return ret;
}
ret = ocelot_ace_rule_offload_add(ocelot, ace);
if (ret)
return ret;
return 0;
return ocelot_ace_rule_offload_add(ocelot, ace);
}
EXPORT_SYMBOL_GPL(ocelot_cls_flower_replace);
......@@ -204,16 +200,11 @@ int ocelot_cls_flower_destroy(struct ocelot *ocelot, int port,
struct flow_cls_offload *f, bool ingress)
{
struct ocelot_ace_rule ace;
int ret;
ace.prio = f->common.prio;
ace.id = f->cookie;
ret = ocelot_ace_rule_offload_del(ocelot, &ace);
if (ret)
return ret;
return 0;
return ocelot_ace_rule_offload_del(ocelot, &ace);
}
EXPORT_SYMBOL_GPL(ocelot_cls_flower_destroy);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册