[PATCH] Correct arguments for kzalloc for oprofile_perf.c patch

William Cohen wcohen at redhat.com
Mon Mar 5 01:02:55 UTC 2012


Signed-off-by: William Cohen <wcohen at redhat.com>
---
 drivers/oprofile/oprofile_perf.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/oprofile/oprofile_perf.c b/drivers/oprofile/oprofile_perf.c
index 54192f3..4edbf58 100644
--- a/drivers/oprofile/oprofile_perf.c
+++ b/drivers/oprofile/oprofile_perf.c
@@ -284,7 +284,7 @@ int __init oprofile_perf_init(struct oprofile_operations *ops)
 		goto out;
 	}
 
-	counter_config = kzalloc(num_counters,
+	counter_config = kzalloc(num_counters *
 			sizeof(struct op_counter_config), GFP_KERNEL);
 
 	if (!counter_config) {
@@ -296,7 +296,7 @@ int __init oprofile_perf_init(struct oprofile_operations *ops)
 	}
 
 	for_each_possible_cpu(cpu) {
-		per_cpu(perf_events, cpu) = kzalloc(num_counters,
+		per_cpu(perf_events, cpu) = kzalloc(num_counters *
 				sizeof(struct perf_event *), GFP_KERNEL);
 		if (!per_cpu(perf_events, cpu)) {
 			pr_info("oprofile: failed to allocate %d perf events "
-- 
1.7.5.2


--------------020300050106030904000606
Content-Type: application/x-sh;
 name="exercise.sh"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="exercise.sh"

IyEvYmluL3NoCgpvcGNvbnRyb2wgLS1kZWluaXQKb3Bjb250cm9sIC0taW5pdApvcGNvbnRy
b2wgLS1yZXNldApvcGNvbnRyb2wgLS1zZXR1cCAtLW5vdm1saW51eApvcGNvbnRyb2wgLS1z
dGFydApzbGVlcCAxMApvcGNvbnRyb2wgLS1kZWluaXQKb3ByZXBvcnQ=
--------------020300050106030904000606--


More information about the arm mailing list