diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-08-20 01:36:52 +0000 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-08-20 16:03:52 +0200 |
commit | ede6bc88d6bbe16a938de2b00f60f4e03768c988 (patch) | |
tree | 5f5343ea1f682eb7f73b6cd476e005115d98a985 | |
parent | 1f7267232711dd2453f9ceccd41906657afbd825 (diff) | |
download | linux-ede6bc88d6bbe16a938de2b00f60f4e03768c988.tar.bz2 |
bpf: Use PTR_ERR_OR_ZERO in xsk_map_inc()
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>
-rw-r--r-- | kernel/bpf/xskmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/xskmap.c b/kernel/bpf/xskmap.c index 4cc28e226398..942c662e2eed 100644 --- 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) |