summaryrefslogtreecommitdiffstats
path: root/drivers/perf/riscv_pmu_sbi.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-11-22 15:39:56 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-11-22 15:39:56 +0100
commit11747c52c04a32dd5e83ebffaf8030e0155c6ee7 (patch)
treedaac554a51dc226d0c2dc7f72567f0f11b0f2f49 /drivers/perf/riscv_pmu_sbi.c
parentecd929caff09448ce7a2830a27611e63ddc823e9 (diff)
parente7770f0e399b8b6ccf46283e7887a3baf2cc2ca8 (diff)
downloadlinux-stable-linux-rolling-stable.tar.gz
linux-stable-linux-rolling-stable.tar.bz2
linux-stable-linux-rolling-stable.zip
Merge v6.11.10linux-rolling-stable
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/perf/riscv_pmu_sbi.c')
-rw-r--r--drivers/perf/riscv_pmu_sbi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/perf/riscv_pmu_sbi.c b/drivers/perf/riscv_pmu_sbi.c
index 671dc55cbd3a..bc562c759e1e 100644
--- a/drivers/perf/riscv_pmu_sbi.c
+++ b/drivers/perf/riscv_pmu_sbi.c
@@ -1380,8 +1380,9 @@ static int pmu_sbi_device_probe(struct platform_device *pdev)
goto out_unregister;
cpu = get_cpu();
-
ret = pmu_sbi_snapshot_setup(pmu, cpu);
+ put_cpu();
+
if (ret) {
/* Snapshot is an optional feature. Continue if not available */
pmu_sbi_snapshot_free(pmu);
@@ -1395,7 +1396,6 @@ static int pmu_sbi_device_probe(struct platform_device *pdev)
*/
static_branch_enable(&sbi_pmu_snapshot_available);
}
- put_cpu();
}
register_sysctl("kernel", sbi_pmu_sysctl_table);