bpf: btf: avoid -Wreturn-type warning
authorArnd Bergmann <arnd@arndb.de>
Fri, 25 May 2018 21:33:19 +0000 (23:33 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 28 May 2018 15:40:58 +0000 (17:40 +0200)
commit53c8036cb715f3577a7fe1db6e6ad06e8697b36f
treeb8dcafa05c4731dbd10d7b0ea72440d10d13e2f3
parenta493f5f9d8c2e87f2d1322c01e477502b3cd11c5
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: eb3f595dab40 ("bpf: btf: Validate type reference")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
kernel/bpf/btf.c