diff options
author | Colin Ian King <colin.king@canonical.com> | 2021-08-17 20:08:42 +0300 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2021-08-18 00:09:12 +0300 |
commit | 8cacfc85b615cc0bae01241593c4b25da6570efc (patch) | |
tree | 8aa0673e7d74df525a294d69190736e3cc87e94b /kernel | |
parent | 04d23194674bf3cf5f6616f3ee4e51fc9305b7d9 (diff) | |
download | linux-8cacfc85b615cc0bae01241593c4b25da6570efc.tar.xz |
bpf: Remove redundant initialization of variable allow
The variable allow is being initialized with a value that is never read, it
is being updated later on. The assignment is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210817170842.495440-1-colin.king@canonical.com
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/bpf/cgroup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/cgroup.c b/kernel/bpf/cgroup.c index a1dedba4c174..9f35928bab0a 100644 --- a/kernel/bpf/cgroup.c +++ b/kernel/bpf/cgroup.c @@ -1135,7 +1135,7 @@ int __cgroup_bpf_check_dev_permission(short dev_type, u32 major, u32 minor, .major = major, .minor = minor, }; - int allow = 1; + int allow; rcu_read_lock(); cgrp = task_dfl_cgroup(current); |