summaryrefslogtreecommitdiffstats
path: root/drivers/hid/bpf
diff options
context:
space:
mode:
authorDavid Vernet <void@manifault.com>2023-03-25 16:31:45 -0500
committerAlexei Starovoitov <ast@kernel.org>2023-03-25 16:56:22 -0700
commitfb2211a57c110b4ced3cb7f8570bd7246acf2d04 (patch)
tree1d94a550acc6b2ee4a15129002a1a3bbbbea80b3 /drivers/hid/bpf
parent1431d0b584a673ea690c88a5f7e1aedd9caf0e84 (diff)
downloadlinux-stable-fb2211a57c110b4ced3cb7f8570bd7246acf2d04.tar.gz
linux-stable-fb2211a57c110b4ced3cb7f8570bd7246acf2d04.tar.bz2
linux-stable-fb2211a57c110b4ced3cb7f8570bd7246acf2d04.zip
bpf: Remove now-unnecessary NULL checks for KF_RELEASE kfuncs
Now that we're not invoking kfunc destructors when the kptr in a map was NULL, we no longer require NULL checks in many of our KF_RELEASE kfuncs. This patch removes those NULL checks. Signed-off-by: David Vernet <void@manifault.com> Link: https://lore.kernel.org/r/20230325213144.486885-3-void@manifault.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'drivers/hid/bpf')
-rw-r--r--drivers/hid/bpf/hid_bpf_dispatch.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/hid/bpf/hid_bpf_dispatch.c b/drivers/hid/bpf/hid_bpf_dispatch.c
index 8a034a555d4c..d9ef45fcaeab 100644
--- a/drivers/hid/bpf/hid_bpf_dispatch.c
+++ b/drivers/hid/bpf/hid_bpf_dispatch.c
@@ -342,9 +342,6 @@ hid_bpf_release_context(struct hid_bpf_ctx *ctx)
{
struct hid_bpf_ctx_kern *ctx_kern;
- if (!ctx)
- return;
-
ctx_kern = container_of(ctx, struct hid_bpf_ctx_kern, ctx);
kfree(ctx_kern);