diff options
author | Colin Ian King <colin.king@canonical.com> | 2018-05-30 18:09:16 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2018-05-31 00:02:48 +0300 |
commit | 71b2c87df3ac37f5f83e166db136b0c1d065a781 (patch) | |
tree | 74d080a57796b6be37997823c3cc7f2c1f55aedf /kernel/bpf | |
parent | 13a370b9d275959ac75e92dc14e43eeae75804f8 (diff) | |
download | linux-71b2c87df3ac37f5f83e166db136b0c1d065a781.tar.xz |
bpf: devmap: remove redundant assignment of dev = dev
The assignment dev = dev is redundant and should be removed.
Detected by CoverityScan, CID#1469486 ("Evaluation order violation")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/bpf')
-rw-r--r-- | kernel/bpf/devmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/devmap.c b/kernel/bpf/devmap.c index ae16d0c373ef..1fe3fe60508a 100644 --- a/kernel/bpf/devmap.c +++ b/kernel/bpf/devmap.c @@ -352,7 +352,7 @@ int dev_map_enqueue(struct bpf_dtab_netdev *dst, struct xdp_buff *xdp, static void *dev_map_lookup_elem(struct bpf_map *map, void *key) { struct bpf_dtab_netdev *obj = __dev_map_lookup_elem(map, *(u32 *)key); - struct net_device *dev = dev = obj ? obj->dev : NULL; + struct net_device *dev = obj ? obj->dev : NULL; return dev ? &dev->ifindex : NULL; } |