mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
libbpf: Remove redundant non-null checks on obj_elf
Obj_elf is already non-null checked at the function entry, so remove redundant non-null checks on obj_elf. Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20220421031803.2283974-1-cuigaosheng1@huawei.com
This commit is contained in:
parent
c14766a8a8
commit
b71a2ebf74
1 changed files with 2 additions and 4 deletions
|
@ -1233,10 +1233,8 @@ static void bpf_object__elf_finish(struct bpf_object *obj)
|
|||
if (!obj->efile.elf)
|
||||
return;
|
||||
|
||||
if (obj->efile.elf) {
|
||||
elf_end(obj->efile.elf);
|
||||
obj->efile.elf = NULL;
|
||||
}
|
||||
elf_end(obj->efile.elf);
|
||||
obj->efile.elf = NULL;
|
||||
obj->efile.symbols = NULL;
|
||||
obj->efile.st_ops_data = NULL;
|
||||
|
||||
|
|
Loading…
Reference in a new issue