From e7a8ac433845aa86f39bf404ae4b7709f21c7d70 Mon Sep 17 00:00:00 2001 From: Anju T Sudhakar Date: Tue, 22 May 2018 14:42:36 +0530 Subject: [PATCH] powerpc/perf: Return appropriate value for unknown domain Return proper error code for unknown domain during IMC initialization. Signed-off-by: Anju T Sudhakar Reviewed-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman --- 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 61000d174dbd..f563d30292ad 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); -- GitLab