diff options
author | Robert Richter <robert.richter@amd.com> | 2010-02-25 20:20:25 +0100 |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2010-02-26 15:20:03 +0100 |
commit | c17c8fbf349482e89b57d1b800e83e9f4cf40c47 (patch) | |
tree | 69378aca16c1837035daab36fa146382fb61bb9d /arch/x86/oprofile/op_model_ppro.c | |
parent | 68dc819ce829f7e7977a56524e710473bdb55115 (diff) | |
download | talos-obmc-linux-c17c8fbf349482e89b57d1b800e83e9f4cf40c47.tar.gz talos-obmc-linux-c17c8fbf349482e89b57d1b800e83e9f4cf40c47.zip |
oprofile/x86: use kzalloc() instead of kmalloc()
Cc: stable@kernel.org
Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'arch/x86/oprofile/op_model_ppro.c')
-rw-r--r-- | arch/x86/oprofile/op_model_ppro.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/x86/oprofile/op_model_ppro.c b/arch/x86/oprofile/op_model_ppro.c index c344525ebb55..5d1727ba409e 100644 --- a/arch/x86/oprofile/op_model_ppro.c +++ b/arch/x86/oprofile/op_model_ppro.c @@ -37,15 +37,11 @@ static void ppro_fill_in_addresses(struct op_msrs * const msrs) for (i = 0; i < num_counters; i++) { if (reserve_perfctr_nmi(MSR_P6_PERFCTR0 + i)) msrs->counters[i].addr = MSR_P6_PERFCTR0 + i; - else - msrs->counters[i].addr = 0; } for (i = 0; i < num_counters; i++) { if (reserve_evntsel_nmi(MSR_P6_EVNTSEL0 + i)) msrs->controls[i].addr = MSR_P6_EVNTSEL0 + i; - else - msrs->controls[i].addr = 0; } } @@ -57,7 +53,7 @@ static void ppro_setup_ctrs(struct op_x86_model_spec const *model, int i; if (!reset_value) { - reset_value = kmalloc(sizeof(reset_value[0]) * num_counters, + reset_value = kzalloc(sizeof(reset_value[0]) * num_counters, GFP_ATOMIC); if (!reset_value) return; |