mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
7002f77541
commit
082ae1e157
1 changed files with 2 additions and 4 deletions
|
@ -268,7 +268,7 @@ static int arc_pmu_device_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct arc_reg_pct_build pct_bcr;
|
struct arc_reg_pct_build pct_bcr;
|
||||||
struct arc_reg_cc_build cc_bcr;
|
struct arc_reg_cc_build cc_bcr;
|
||||||
int i, j, ret;
|
int i, j;
|
||||||
|
|
||||||
union cc_name {
|
union cc_name {
|
||||||
struct {
|
struct {
|
||||||
|
@ -335,9 +335,7 @@ static int arc_pmu_device_probe(struct platform_device *pdev)
|
||||||
/* ARC 700 PMU does not support sampling events */
|
/* ARC 700 PMU does not support sampling events */
|
||||||
arc_pmu->pmu.capabilities |= PERF_PMU_CAP_NO_INTERRUPT;
|
arc_pmu->pmu.capabilities |= PERF_PMU_CAP_NO_INTERRUPT;
|
||||||
|
|
||||||
ret = perf_pmu_register(&arc_pmu->pmu, pdev->name, PERF_TYPE_RAW);
|
return perf_pmu_register(&arc_pmu->pmu, pdev->name, PERF_TYPE_RAW);
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_OF
|
#ifdef CONFIG_OF
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue