summaryrefslogtreecommitdiff
path: root/arch/arc/kernel
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2015-04-24 10:27:34 +0200
committerVineet Gupta <vgupta@synopsys.com>2015-06-19 18:09:28 +0530
commit082ae1e1570c69a06221701718f548bd4000b95b (patch)
treeafa10dc5374407b5705b643f1c9509df6dff4d76 /arch/arc/kernel
parent7002f77541f877a5590615ceb3da32b114f14b62 (diff)
ARC: perf: Remove unnecessary local variable
Directly return the result of perf_pmu_register() in arc_pmu_device_probe() instead of assigning and returning variable ret. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/kernel')
-rw-r--r--arch/arc/kernel/perf_event.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/arc/kernel/perf_event.c b/arch/arc/kernel/perf_event.c
index 57b58f52d825..1287388c258a 100644
--- a/arch/arc/kernel/perf_event.c
+++ b/arch/arc/kernel/perf_event.c
@@ -268,7 +268,7 @@ static int arc_pmu_device_probe(struct platform_device *pdev)
{
struct arc_reg_pct_build pct_bcr;
struct arc_reg_cc_build cc_bcr;
- int i, j, ret;
+ int i, j;
union cc_name {
struct {
@@ -335,9 +335,7 @@ static int arc_pmu_device_probe(struct platform_device *pdev)
/* ARC 700 PMU does not support sampling events */
arc_pmu->pmu.capabilities |= PERF_PMU_CAP_NO_INTERRUPT;
- ret = perf_pmu_register(&arc_pmu->pmu, pdev->name, PERF_TYPE_RAW);
-
- return ret;
+ return perf_pmu_register(&arc_pmu->pmu, pdev->name, PERF_TYPE_RAW);
}
#ifdef CONFIG_OF