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>
                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);
 
                              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);