Skip to content
Commit abbaa433 authored by Wang Qing's avatar Wang Qing Committed by Daniel Borkmann
Browse files

bpf: Fix passing zero to PTR_ERR() in bpf_btf_printf_prepare



There is a bug when passing zero to PTR_ERR() and return.
Fix the smatch error.

Fixes: c4d0bfb4 ("bpf: Add bpf_snprintf_btf helper")
Signed-off-by: default avatarWang Qing <wangqing@vivo.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Acked-by: default avatarYonghong Song <yhs@fb.com>
Acked-by: default avatarJohn Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/1604735144-686-1-git-send-email-wangqing@vivo.com
parent 197afc63
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment