Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53c8036c authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Daniel Borkmann
Browse files

bpf: btf: avoid -Wreturn-type warning



gcc warns about a noreturn function possibly returning in
some configurations:

kernel/bpf/btf.c: In function 'env_type_is_resolve_sink':
kernel/bpf/btf.c:729:1: error: control reaches end of non-void function [-Werror=return-type]

Using BUG() instead of BUG_ON() avoids that warning and otherwise
does the exact same thing.

Fixes: eb3f595d ("bpf: btf: Validate type reference")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarSong Liu <songliubraving@fb.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
parent a493f5f9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -749,7 +749,7 @@ static bool env_type_is_resolve_sink(const struct btf_verifier_env *env,
			!btf_type_is_array(next_type) &&
			!btf_type_is_struct(next_type);
	default:
		BUG_ON(1);
		BUG();
	}
}