summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2020-02-29 16:31:08 +0200
committerDavid S. Miller <davem@davemloft.net>2020-03-03 18:57:29 -0800
commitd3ac98668640858fd84164100710155317d87d6c (patch)
tree564534a12b09b1d62b807e394be34595112a7d61 /drivers/net/ethernet
parentce6659c55b7dad1eea57b4e9fe6e77d39d22c286 (diff)
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: Vladimir Oltean <vladimir.oltean@nxp.com> Tested-by: Horatiu Vultur <horatiu.vultur@microchip.com> Reviewed-by: Allan W. Nielsen <allan.nielsen@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/mscc/ocelot_flower.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/net/ethernet/mscc/ocelot_flower.c b/drivers/net/ethernet/mscc/ocelot_flower.c
index 698e9fee6b1a..8993dadf063c 100644
--- a/drivers/net/ethernet/mscc/ocelot_flower.c
+++ b/drivers/net/ethernet/mscc/ocelot_flower.c
@@ -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);