]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
perf/x86/amd/uncore: Fix the return value of amd_uncore_df_event_init() on error
authorSandipan Das <sandipan.das@amd.com>
Tue, 9 Dec 2025 08:26:38 +0000 (13:56 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2026 09:17:01 +0000 (10:17 +0100)
commitc540db17e4afeaf1f4467b76c62b72ac4e2b001b
treee58a83ad26b54b4e474e64f1eb5e673d9b65c215
parentb635895918d856527593f8bc5c4974a53b3eadfe
perf/x86/amd/uncore: Fix the return value of amd_uncore_df_event_init() on error

commit 01439286514ce9d13b8123f8ec3717d7135ff1d6 upstream.

If amd_uncore_event_init() fails, return an error irrespective of the
pmu_version. Setting hwc->config should be safe even if there is an
error so use this opportunity to simplify the code.

Closes: https://lore.kernel.org/all/aTaI0ci3vZ44lmBn@stanley.mountain/
Fixes: d6389d3ccc13 ("perf/x86/amd/uncore: Refactor uncore management")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Sandipan Das <sandipan.das@amd.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/076935e23a70335d33bd6e23308b75ae0ad35ba2.1765268667.git.sandipan.das@amd.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/events/amd/uncore.c