Commit ede6bc88 authored by YueHaibing's avatar YueHaibing Committed by Daniel Borkmann

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: default avatarYueHaibing <yuehaibing@huawei.com>
Acked-by: default avatarBjörn Töpel <bjorn.topel@intel.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
parent 1f726723
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment