HID: bpf: reorder BPF registration
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Fri, 13 Jan 2023 09:09:35 +0000 (10:09 +0100)
committerJiri Kosina <jkosina@suse.cz>
Wed, 18 Jan 2023 21:08:38 +0000 (22:08 +0100)
commit0c2d572828a68e8416619e0832d4d55317cb3c57
treefa9d89d692a32239c36e80d82c895ca8d81d5a4e
parentbb2c0aeac145c4e5b74620fd8c0f7862777b8677
HID: bpf: reorder BPF registration

Given that our initial BPF program is not using any kfuncs anymore,
we can reorder the initialization to first try to load it and then
register the kfuncs. This has the advantage of not exporting kfuncs
when HID-BPF is not working.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/bpf/hid_bpf_dispatch.c