Skip to content

Commit 98857d1

Browse files
rbmarliereanakryiko
authored andcommitted
selftests/bpf: Fix bpf_prog_detach2 usage in test_lirc_mode2
Commit e9fc3ce ("libbpf: Streamline error reporting for high-level APIs") redefined the way that bpf_prog_detach2() returns. Therefore, adapt the usage in test_lirc_mode2_user.c. Signed-off-by: Ricardo B. Marlière <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent 737433c commit 98857d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/bpf/test_lirc_mode2_user.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ int main(int argc, char **argv)
7474

7575
/* Let's try detach it before it was ever attached */
7676
ret = bpf_prog_detach2(progfd, lircfd, BPF_LIRC_MODE2);
77-
if (ret != -1 || errno != ENOENT) {
77+
if (ret != -ENOENT) {
7878
printf("bpf_prog_detach2 not attached should fail: %m\n");
7979
return 1;
8080
}

0 commit comments

Comments
 (0)