aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/powernow-k8.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cpufreq/powernow-k8.c')
-rw-r--r--drivers/cpufreq/powernow-k8.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/cpufreq/powernow-k8.c b/drivers/cpufreq/powernow-k8.c
index c39d189217cb..2344a9ed17f3 100644
--- a/drivers/cpufreq/powernow-k8.c
+++ b/drivers/cpufreq/powernow-k8.c
@@ -623,7 +623,7 @@ static int fill_powernow_table(struct powernow_k8_data *data,
623 if (check_pst_table(data, pst, maxvid)) 623 if (check_pst_table(data, pst, maxvid))
624 return -EINVAL; 624 return -EINVAL;
625 625
626 powernow_table = kmalloc((sizeof(struct cpufreq_frequency_table) 626 powernow_table = kmalloc((sizeof(*powernow_table)
627 * (data->numps + 1)), GFP_KERNEL); 627 * (data->numps + 1)), GFP_KERNEL);
628 if (!powernow_table) { 628 if (!powernow_table) {
629 printk(KERN_ERR PFX "powernow_table memory alloc failure\n"); 629 printk(KERN_ERR PFX "powernow_table memory alloc failure\n");
@@ -793,7 +793,7 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data)
793 } 793 }
794 794
795 /* fill in data->powernow_table */ 795 /* fill in data->powernow_table */
796 powernow_table = kmalloc((sizeof(struct cpufreq_frequency_table) 796 powernow_table = kmalloc((sizeof(*powernow_table)
797 * (data->acpi_data.state_count + 1)), GFP_KERNEL); 797 * (data->acpi_data.state_count + 1)), GFP_KERNEL);
798 if (!powernow_table) { 798 if (!powernow_table) {
799 pr_debug("powernow_table memory alloc failure\n"); 799 pr_debug("powernow_table memory alloc failure\n");
@@ -1106,7 +1106,7 @@ static int powernowk8_cpu_init(struct cpufreq_policy *pol)
1106 if (rc) 1106 if (rc)
1107 return -ENODEV; 1107 return -ENODEV;
1108 1108
1109 data = kzalloc(sizeof(struct powernow_k8_data), GFP_KERNEL); 1109 data = kzalloc(sizeof(*data), GFP_KERNEL);
1110 if (!data) { 1110 if (!data) {
1111 printk(KERN_ERR PFX "unable to alloc powernow_k8_data"); 1111 printk(KERN_ERR PFX "unable to alloc powernow_k8_data");
1112 return -ENOMEM; 1112 return -ENOMEM;
@@ -1240,7 +1240,6 @@ static struct cpufreq_driver cpufreq_amd64_driver = {
1240 .exit = powernowk8_cpu_exit, 1240 .exit = powernowk8_cpu_exit,
1241 .get = powernowk8_get, 1241 .get = powernowk8_get,
1242 .name = "powernow-k8", 1242 .name = "powernow-k8",
1243 .owner = THIS_MODULE,
1244 .attr = powernow_k8_attr, 1243 .attr = powernow_k8_attr,
1245}; 1244};
1246 1245