Skip to content

Commit cc1ebd2

Browse files
rbmarliereKernel Patches Daemon
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]>
1 parent 83124e1 commit cc1ebd2

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)