git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
perf_counter/powerpc: Check oprofile_cpu_type for NULL before using it
[pandora-kernel.git]
/
arch
/
powerpc
/
kernel
/
mpc7450-pmu.c
diff --git
a/arch/powerpc/kernel/mpc7450-pmu.c
b/arch/powerpc/kernel/mpc7450-pmu.c
index
c244133
..
cc466d0
100644
(file)
--- a/
arch/powerpc/kernel/mpc7450-pmu.c
+++ b/
arch/powerpc/kernel/mpc7450-pmu.c
@@
-407,7
+407,8
@@
struct power_pmu mpc7450_pmu = {
static int init_mpc7450_pmu(void)
{
- if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc/7450"))
+ if (!cur_cpu_spec->oprofile_cpu_type ||
+ strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc/7450"))
return -ENODEV;
return register_power_pmu(&mpc7450_pmu);