[PATCH 3/4] powerpc/perf: Return appropriate value for unknown domain

Anju T Sudhakar anju at linux.vnet.ibm.com
Mon Apr 9 19:00:24 AEST 2018


Return proper error code for unknown domain during IMC initialization.

Signed-off-by: Anju T Sudhakar <anju at linux.vnet.ibm.com>
---
 arch/powerpc/perf/imc-pmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/perf/imc-pmu.c b/arch/powerpc/perf/imc-pmu.c
index 1b285cd..4b4ca83 100644
--- a/arch/powerpc/perf/imc-pmu.c
+++ b/arch/powerpc/perf/imc-pmu.c
@@ -1371,7 +1371,7 @@ int init_imc_pmu(struct device_node *parent, struct imc_pmu *pmu_ptr, int pmu_id
 
 		break;
 	default:
-		return  -1;	/* Unknown domain */
+		return  -EINVAL;	/* Unknown domain */
 	}
 
 	ret = update_events_in_group(parent, pmu_ptr);
-- 
2.7.4



More information about the Linuxppc-dev mailing list