projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
13a370b
)
bpf: devmap: remove redundant assignment of dev = dev
author
Colin Ian King
<
[email protected]
>
Wed, 30 May 2018 15:09:16 +0000
(16:09 +0100)
committer
Alexei Starovoitov
<
[email protected]
>
Wed, 30 May 2018 21:02:48 +0000
(14:02 -0700)
The assignment dev = dev is redundant and should be removed.
Detected by CoverityScan, CID#
1469486
("Evaluation order violation")
Signed-off-by: Colin Ian King <
[email protected]
>
Acked-by: Song Liu <
[email protected]
>
Signed-off-by: Alexei Starovoitov <
[email protected]
>
kernel/bpf/devmap.c
patch
|
blob
|
history
diff --git
a/kernel/bpf/devmap.c
b/kernel/bpf/devmap.c
index ae16d0c373efb0271deaa1ec8b231582d48dd9fa..1fe3fe60508aa9a7cab3ed37ae09aa23fab118a0 100644
(file)
--- 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;
}