summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r--arch/arm/kernel/pmu.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/kernel/pmu.c b/arch/arm/kernel/pmu.c
index 87942b931c6..de6b1b0860c 100644
--- a/arch/arm/kernel/pmu.c
+++ b/arch/arm/kernel/pmu.c
@@ -34,13 +34,13 @@ static int __devinit pmu_register(struct platform_device *pdev,
return -EINVAL;
}
- if (pmu_devices[type])
- pr_warning("registering new PMU device type %d overwrites "
- "previous registration!\n", type);
- else
- pr_info("registered new PMU device of type %d\n",
- type);
+ if (pmu_devices[type]) {
+ pr_warning("rejecting duplicate registration of PMU device "
+ "type %d.", type);
+ return -ENOSPC;
+ }
+ pr_info("registered new PMU device of type %d\n", type);
pmu_devices[type] = pdev;
return 0;
}