libbpf: Fix wrong variable used in perf_event_uprobe_open_legacy()

Use "type" as opposed to "err" in pr_warn() after
determine_uprobe_perf_type_legacy() returns an error.

Signed-off-by: Chuang Wang <nashuiliang@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220629151848.65587-3-nashuiliang@gmail.com
This commit is contained in:
Chuang Wang 2022-06-29 23:18:46 +08:00 committed by Andrii Nakryiko
parent 8094029330
commit 5666fc997c
1 changed files with 1 additions and 1 deletions

View File

@ -10249,7 +10249,7 @@ static int perf_event_uprobe_open_legacy(const char *probe_name, bool retprobe,
type = determine_uprobe_perf_type_legacy(probe_name, retprobe);
if (type < 0) {
pr_warn("failed to determine legacy uprobe event id for %s:0x%zx: %d\n",
binary_path, offset, err);
binary_path, offset, type);
return type;
}