mfd: sec-core: Add support for S2MPU02 device
[cascardo/linux.git] / drivers / cpufreq / spear-cpufreq.c
index 4cfdcff..3867839 100644 (file)
@@ -195,18 +195,15 @@ static int spear_cpufreq_probe(struct platform_device *pdev)
        cnt = prop->length / sizeof(u32);
        val = prop->value;
 
-       freq_tbl = kmalloc(sizeof(*freq_tbl) * (cnt + 1), GFP_KERNEL);
+       freq_tbl = kzalloc(sizeof(*freq_tbl) * (cnt + 1), GFP_KERNEL);
        if (!freq_tbl) {
                ret = -ENOMEM;
                goto out_put_node;
        }
 
-       for (i = 0; i < cnt; i++) {
-               freq_tbl[i].driver_data = i;
+       for (i = 0; i < cnt; i++)
                freq_tbl[i].frequency = be32_to_cpup(val++);
-       }
 
-       freq_tbl[i].driver_data = i;
        freq_tbl[i].frequency = CPUFREQ_TABLE_END;
 
        spear_cpufreq.freq_tbl = freq_tbl;