Simplify double 'if' statements to one 'if' statement. Signed-off-by: Wan Jiabing <wanjiabing@xxxxxxxx> --- kernel/trace/bpf_trace.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c index 3a8b69ef9a0d..1b0db8f78dc8 100644 --- a/kernel/trace/bpf_trace.c +++ b/kernel/trace/bpf_trace.c @@ -2464,11 +2464,9 @@ int bpf_kprobe_multi_link_attach(const union bpf_attr *attr, struct bpf_prog *pr if (!addrs) return -ENOMEM; - if (uaddrs) { - if (copy_from_user(addrs, uaddrs, size)) { - err = -EFAULT; - goto error_addrs; - } + if (uaddrs && copy_from_user(addrs, uaddrs, size)) { + err = -EFAULT; + goto error_addrs; } else { struct user_syms us; -- 2.35.1