mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 17:25:38 +00:00
perf bpf-filter: Return -ENOMEM directly when pfi allocation fails
Directly return -ENOMEM when pfi allocation fails,
instead of performing other operations on pfi.
Fixes: 0fe2b18ddc
("perf bpf-filter: Support multiple events properly")
Signed-off-by: Hao Ge <gehao@kylinos.cn>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: hao.ge@linux.dev
Cc: bpf@vger.kernel.org
Link: https://lore.kernel.org/r/20241113030537.26732-1-hao.ge@linux.dev
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
parent
fc26637d70
commit
bd077a53ad
@ -375,7 +375,7 @@ static int create_idx_hash(struct evsel *evsel, struct perf_bpf_filter_entry *en
|
||||
pfi = zalloc(sizeof(*pfi));
|
||||
if (pfi == NULL) {
|
||||
pr_err("Cannot save pinned filter index\n");
|
||||
goto err;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
pfi->evsel = evsel;
|
||||
|
Loading…
Reference in New Issue
Block a user