Loading arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c +1 −2 Original line number Diff line number Diff line Loading @@ -376,10 +376,9 @@ acpi_cpufreq_cpu_init ( arg0.buffer.length = 12; arg0.buffer.pointer = (u8 *) arg0_buf; data = kmalloc(sizeof(struct cpufreq_acpi_io), GFP_KERNEL); data = kzalloc(sizeof(struct cpufreq_acpi_io), GFP_KERNEL); if (!data) return (-ENOMEM); memset(data, 0, sizeof(struct cpufreq_acpi_io)); acpi_io_data[cpu] = data; Loading arch/i386/kernel/cpu/cpufreq/powernow-k7.c +3 −9 Original line number Diff line number Diff line Loading @@ -171,10 +171,9 @@ static int get_ranges (unsigned char *pst) unsigned int speed; u8 fid, vid; powernow_table = kmalloc((sizeof(struct cpufreq_frequency_table) * (number_scales + 1)), GFP_KERNEL); powernow_table = kzalloc((sizeof(struct cpufreq_frequency_table) * (number_scales + 1)), GFP_KERNEL); if (!powernow_table) return -ENOMEM; memset(powernow_table, 0, (sizeof(struct cpufreq_frequency_table) * (number_scales + 1))); for (j=0 ; j < number_scales; j++) { fid = *pst++; Loading Loading @@ -305,16 +304,13 @@ static int powernow_acpi_init(void) goto err0; } acpi_processor_perf = kmalloc(sizeof(struct acpi_processor_performance), acpi_processor_perf = kzalloc(sizeof(struct acpi_processor_performance), GFP_KERNEL); if (!acpi_processor_perf) { retval = -ENOMEM; goto err0; } memset(acpi_processor_perf, 0, sizeof(struct acpi_processor_performance)); if (acpi_processor_register_performance(acpi_processor_perf, 0)) { retval = -EIO; goto err1; Loading @@ -337,14 +333,12 @@ static int powernow_acpi_init(void) goto err2; } powernow_table = kmalloc((number_scales + 1) * (sizeof(struct cpufreq_frequency_table)), GFP_KERNEL); powernow_table = kzalloc((number_scales + 1) * (sizeof(struct cpufreq_frequency_table)), GFP_KERNEL); if (!powernow_table) { retval = -ENOMEM; goto err2; } memset(powernow_table, 0, ((number_scales + 1) * sizeof(struct cpufreq_frequency_table))); pc.val = (unsigned long) acpi_processor_perf->states[0].control; for (i = 0; i < number_scales; i++) { u8 fid, vid; Loading arch/i386/kernel/cpu/cpufreq/powernow-k8.c +1 −2 Original line number Diff line number Diff line Loading @@ -976,12 +976,11 @@ static int __init powernowk8_cpu_init(struct cpufreq_policy *pol) if (!check_supported_cpu(pol->cpu)) return -ENODEV; data = kmalloc(sizeof(struct powernow_k8_data), GFP_KERNEL); data = kzalloc(sizeof(struct powernow_k8_data), GFP_KERNEL); if (!data) { printk(KERN_ERR PFX "unable to alloc powernow_k8_data"); return -ENOMEM; } memset(data,0,sizeof(struct powernow_k8_data)); data->cpu = pol->cpu; Loading arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c +1 −2 Original line number Diff line number Diff line Loading @@ -422,12 +422,11 @@ static int centrino_cpu_init_acpi(struct cpufreq_policy *policy) } } centrino_model[cpu] = kmalloc(sizeof(struct cpu_model), GFP_KERNEL); centrino_model[cpu] = kzalloc(sizeof(struct cpu_model), GFP_KERNEL); if (!centrino_model[cpu]) { result = -ENOMEM; goto err_unreg; } memset(centrino_model[cpu], 0, sizeof(struct cpu_model)); centrino_model[cpu]->model_name=NULL; centrino_model[cpu]->max_freq = p.states[0].core_frequency * 1000; Loading Loading
arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c +1 −2 Original line number Diff line number Diff line Loading @@ -376,10 +376,9 @@ acpi_cpufreq_cpu_init ( arg0.buffer.length = 12; arg0.buffer.pointer = (u8 *) arg0_buf; data = kmalloc(sizeof(struct cpufreq_acpi_io), GFP_KERNEL); data = kzalloc(sizeof(struct cpufreq_acpi_io), GFP_KERNEL); if (!data) return (-ENOMEM); memset(data, 0, sizeof(struct cpufreq_acpi_io)); acpi_io_data[cpu] = data; Loading
arch/i386/kernel/cpu/cpufreq/powernow-k7.c +3 −9 Original line number Diff line number Diff line Loading @@ -171,10 +171,9 @@ static int get_ranges (unsigned char *pst) unsigned int speed; u8 fid, vid; powernow_table = kmalloc((sizeof(struct cpufreq_frequency_table) * (number_scales + 1)), GFP_KERNEL); powernow_table = kzalloc((sizeof(struct cpufreq_frequency_table) * (number_scales + 1)), GFP_KERNEL); if (!powernow_table) return -ENOMEM; memset(powernow_table, 0, (sizeof(struct cpufreq_frequency_table) * (number_scales + 1))); for (j=0 ; j < number_scales; j++) { fid = *pst++; Loading Loading @@ -305,16 +304,13 @@ static int powernow_acpi_init(void) goto err0; } acpi_processor_perf = kmalloc(sizeof(struct acpi_processor_performance), acpi_processor_perf = kzalloc(sizeof(struct acpi_processor_performance), GFP_KERNEL); if (!acpi_processor_perf) { retval = -ENOMEM; goto err0; } memset(acpi_processor_perf, 0, sizeof(struct acpi_processor_performance)); if (acpi_processor_register_performance(acpi_processor_perf, 0)) { retval = -EIO; goto err1; Loading @@ -337,14 +333,12 @@ static int powernow_acpi_init(void) goto err2; } powernow_table = kmalloc((number_scales + 1) * (sizeof(struct cpufreq_frequency_table)), GFP_KERNEL); powernow_table = kzalloc((number_scales + 1) * (sizeof(struct cpufreq_frequency_table)), GFP_KERNEL); if (!powernow_table) { retval = -ENOMEM; goto err2; } memset(powernow_table, 0, ((number_scales + 1) * sizeof(struct cpufreq_frequency_table))); pc.val = (unsigned long) acpi_processor_perf->states[0].control; for (i = 0; i < number_scales; i++) { u8 fid, vid; Loading
arch/i386/kernel/cpu/cpufreq/powernow-k8.c +1 −2 Original line number Diff line number Diff line Loading @@ -976,12 +976,11 @@ static int __init powernowk8_cpu_init(struct cpufreq_policy *pol) if (!check_supported_cpu(pol->cpu)) return -ENODEV; data = kmalloc(sizeof(struct powernow_k8_data), GFP_KERNEL); data = kzalloc(sizeof(struct powernow_k8_data), GFP_KERNEL); if (!data) { printk(KERN_ERR PFX "unable to alloc powernow_k8_data"); return -ENOMEM; } memset(data,0,sizeof(struct powernow_k8_data)); data->cpu = pol->cpu; Loading
arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c +1 −2 Original line number Diff line number Diff line Loading @@ -422,12 +422,11 @@ static int centrino_cpu_init_acpi(struct cpufreq_policy *policy) } } centrino_model[cpu] = kmalloc(sizeof(struct cpu_model), GFP_KERNEL); centrino_model[cpu] = kzalloc(sizeof(struct cpu_model), GFP_KERNEL); if (!centrino_model[cpu]) { result = -ENOMEM; goto err_unreg; } memset(centrino_model[cpu], 0, sizeof(struct cpu_model)); centrino_model[cpu]->model_name=NULL; centrino_model[cpu]->max_freq = p.states[0].core_frequency * 1000; Loading