aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Richter <[email protected]>2023-02-24 09:01:51 +0100
committerVasily Gorbik <[email protected]>2023-04-13 17:36:28 +0200
commitc01f2a5fe4e3df4ab846fcba5435ca9fdee4f583 (patch)
tree74457797032d47a8ed9475b988ff8b78f082b99c
parentb3e0423c4e76b19f04799e01b6443949f5fecbbc (diff)
s390/cpum_cf: simplify pr_err() statement in cpumf_pmu_enable/disable
Simplify pr_err() statement into one line and omit return statement. No functional change. Signed-off-by: Thomas Richter <[email protected]> Acked-by: Sumanth Korikkar <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
-rw-r--r--arch/s390/kernel/perf_cpum_cf.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/arch/s390/kernel/perf_cpum_cf.c b/arch/s390/kernel/perf_cpum_cf.c
index 4c158faa3075..96b581967334 100644
--- a/arch/s390/kernel/perf_cpum_cf.c
+++ b/arch/s390/kernel/perf_cpum_cf.c
@@ -471,13 +471,10 @@ static void cpumf_pmu_enable(struct pmu *pmu)
return;
err = lcctl(cpuhw->state | cpuhw->dev_state);
- if (err) {
- pr_err("Enabling the performance measuring unit "
- "failed with rc=%x\n", err);
- return;
- }
-
- cpuhw->flags |= PMU_F_ENABLED;
+ if (err)
+ pr_err("Enabling the performance measuring unit failed with rc=%x\n", err);
+ else
+ cpuhw->flags |= PMU_F_ENABLED;
}
/*
@@ -497,13 +494,10 @@ static void cpumf_pmu_disable(struct pmu *pmu)
inactive = cpuhw->state & ~((1 << CPUMF_LCCTL_ENABLE_SHIFT) - 1);
inactive |= cpuhw->dev_state;
err = lcctl(inactive);
- if (err) {
- pr_err("Disabling the performance measuring unit "
- "failed with rc=%x\n", err);
- return;
- }
-
- cpuhw->flags &= ~PMU_F_ENABLED;
+ if (err)
+ pr_err("Disabling the performance measuring unit failed with rc=%x\n", err);
+ else
+ cpuhw->flags &= ~PMU_F_ENABLED;
}
#define PMC_INIT 0UL