diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 14f783a190c73aa3724f871e11015006219f3980..86aee0907194b9787243e799bccd7debbe0d5c0b 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -11762,9 +11762,6 @@ static int sanitize_err(struct bpf_verifier_env *env,
 			const struct bpf_reg_state *off_reg,
 			const struct bpf_reg_state *dst_reg)
 {
-	static const char *err = "pointer arithmetic with it prohibited for !root";
-	const char *op = BPF_OP(insn->code) == BPF_ADD ? "add" : "sub";
-	u32 dst = insn->dst_reg, src = insn->src_reg;
 	struct bpf_insn_aux_data *aux = cur_aux(env);
 
 	switch (reason) {