OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f72672
)
bpf: Use PTR_ERR_OR_ZERO in xsk_map_inc()
author
YueHaibing
<yuehaibing@huawei.com>
Tue, 20 Aug 2019 01:36:52 +0000
(
01:36
+0000)
committer
Daniel Borkmann
<daniel@iogearbox.net>
Tue, 20 Aug 2019 14:03:52 +0000
(16:03 +0200)
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Björn Töpel <bjorn.topel@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
kernel/bpf/xskmap.c
patch
|
blob
|
history
diff --git
a/kernel/bpf/xskmap.c
b/kernel/bpf/xskmap.c
index
4cc28e2
..
942c662
100644
(file)
--- a/
kernel/bpf/xskmap.c
+++ b/
kernel/bpf/xskmap.c
@@
-21,7
+21,7
@@
int xsk_map_inc(struct xsk_map *map)
struct bpf_map *m = &map->map;
m = bpf_map_inc(m, false);
- return
IS_ERR(m) ? PTR_ERR(m) : 0
;
+ return
PTR_ERR_OR_ZERO(m)
;
}
void xsk_map_put(struct xsk_map *map)