diff options
Diffstat (limited to 'arch/arm/kernel/perf_event.c')
-rw-r--r-- | arch/arm/kernel/perf_event.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index 172101ac97de..5bb91bf3d47f 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c | |||
@@ -346,15 +346,15 @@ validate_group(struct perf_event *event) | |||
346 | fake_pmu.used_mask = fake_used_mask; | 346 | fake_pmu.used_mask = fake_used_mask; |
347 | 347 | ||
348 | if (!validate_event(&fake_pmu, leader)) | 348 | if (!validate_event(&fake_pmu, leader)) |
349 | return -ENOSPC; | 349 | return -EINVAL; |
350 | 350 | ||
351 | list_for_each_entry(sibling, &leader->sibling_list, group_entry) { | 351 | list_for_each_entry(sibling, &leader->sibling_list, group_entry) { |
352 | if (!validate_event(&fake_pmu, sibling)) | 352 | if (!validate_event(&fake_pmu, sibling)) |
353 | return -ENOSPC; | 353 | return -EINVAL; |
354 | } | 354 | } |
355 | 355 | ||
356 | if (!validate_event(&fake_pmu, event)) | 356 | if (!validate_event(&fake_pmu, event)) |
357 | return -ENOSPC; | 357 | return -EINVAL; |
358 | 358 | ||
359 | return 0; | 359 | return 0; |
360 | } | 360 | } |
@@ -639,6 +639,9 @@ static struct platform_device_id armpmu_plat_device_ids[] = { | |||
639 | 639 | ||
640 | static int __devinit armpmu_device_probe(struct platform_device *pdev) | 640 | static int __devinit armpmu_device_probe(struct platform_device *pdev) |
641 | { | 641 | { |
642 | if (!cpu_pmu) | ||
643 | return -ENODEV; | ||
644 | |||
642 | cpu_pmu->plat_device = pdev; | 645 | cpu_pmu->plat_device = pdev; |
643 | return 0; | 646 | return 0; |
644 | } | 647 | } |