Commit b86fdd41 authored by Wang Hai's avatar Wang Hai Committed by Greg Kroah-Hartman
Browse files

samples/bpf: Fix the error return code of xdp_redirect's main()



[ Upstream commit 7c6090ee ]

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

If bpf_map_update_elem() failed, main() should return a negative error.

Fixes: 832622e6 ("xdp: sample program for new bpf_redirect helper")
Signed-off-by: default avatarWang Hai <wanghai38@huawei.com>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210616042534.315097-1-wanghai38@huawei.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 1853dabf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment