On Tue, Oct 10, 2017 at 12:30 AM, Jiri Pirko <j...@resnulli.us> wrote:
> -static int tcf_mirred_device(const struct tc_action *a, struct net *net,
> -                            struct net_device **mirred_dev)
> +static struct net_device *tcf_mirred_get_dev(const struct tc_action *a)
>  {
> -       int ifindex = tcf_mirred_ifindex(a);
> +       struct tcf_mirred *m = to_mirred(a);
>
> -       *mirred_dev = __dev_get_by_index(net, ifindex);
> -       if (!*mirred_dev)
> -               return -EINVAL;
> -       return 0;
> +       return __dev_get_by_index(m->net, m->tcfm_ifindex);

Hmm, why not just return m->tcfm_dev?

Reply via email to