projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a734d1f
)
bpf: Use PTR_ERR_OR_ZERO in bpf_fd_sk_storage_update_elem()
author
YueHaibing
<yuehaibing@huawei.com>
Mon, 29 Apr 2019 13:56:11 +0000
(13:56 +0000)
committer
Alexei Starovoitov
<ast@kernel.org>
Sun, 5 May 2019 06:20:58 +0000
(23:20 -0700)
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
net/core/bpf_sk_storage.c
patch
|
blob
|
history
diff --git
a/net/core/bpf_sk_storage.c
b/net/core/bpf_sk_storage.c
index
a8e9ac7
..
cc9597a
100644
(file)
--- a/
net/core/bpf_sk_storage.c
+++ b/
net/core/bpf_sk_storage.c
@@
-708,7
+708,7
@@
static int bpf_fd_sk_storage_update_elem(struct bpf_map *map, void *key,
if (sock) {
sdata = sk_storage_update(sock->sk, map, value, map_flags);
sockfd_put(sock);
- return
IS_ERR(sdata) ? PTR_ERR(sdata) : 0
;
+ return
PTR_ERR_OR_ZERO(sdata)
;
}
return err;