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: NWang Qing <wangqing@vivo.com> Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net> Acked-by: NYonghong Song <yhs@fb.com> Acked-by: NJohn Fastabend <john.fastabend@gmail.com> Link: https://lore.kernel.org/bpf/1604735144-686-1-git-send-email-wangqing@vivo.com
Showing
想要评论请 注册 或 登录