act_mirred: fix a typo in get_dev
authorWANG Cong <xiyou.wangcong@gmail.com>
Sat, 3 Dec 2016 18:36:01 +0000 (10:36 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 4 Dec 2016 00:28:02 +0000 (19:28 -0500)
Fixes: 255cb30425c0 ("net/sched: act_mirred: Add new tc_action_ops get_dev()")
Cc: Hadar Hen Zion <hadarh@mellanox.com>
Cc: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/act_mirred.c

index bb09ba3ca5c29bc282d19d928ed3f12fb8f0d5c1..2d9fa6e0a1b4a7320a44799a525013273f5cf9eb 100644 (file)
@@ -321,7 +321,7 @@ static int tcf_mirred_device(const struct tc_action *a, struct net *net,
        int ifindex = tcf_mirred_ifindex(a);
 
        *mirred_dev = __dev_get_by_index(net, ifindex);
-       if (!mirred_dev)
+       if (!*mirred_dev)
                return -EINVAL;
        return 0;
 }