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>
This commit is contained in:
YueHaibing 2019-08-20 01:36:52 +00:00 committed by Daniel Borkmann
parent 1f72672327
commit ede6bc88d6
1 changed files with 1 additions and 1 deletions

View File

@ -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)