As KF_TRUSTED_ARGS is now considered default for all kfuns, the verifier
will not allow passing NULL pointers to these kfuns. These checks for
NULL pointers can therefore be removed.
Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
Link: https://lore.kernel.org/r/20260102180038.2708325-6-puranjay@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
{
struct hid_bpf_ctx_kern *ctx_kern;
- if (!ctx)
- return NULL;
-
ctx_kern = container_of(ctx, struct hid_bpf_ctx_kern, ctx);
if (rdwr_buf_size + offset > ctx->allocated_size)
u32 report_len;
/* check arguments */
- if (!ctx || !hid_ops || !buf)
+ if (!hid_ops)
return -EINVAL;
switch (rtype) {