Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
[cascardo/linux.git] / arch / arm / mach-pxa / pm.c
index 388463b..e7450fb 100644 (file)
@@ -104,8 +104,9 @@ static int __init pxa_pm_init(void)
                return -EINVAL;
        }
 
-       sleep_save = kmalloc(pxa_cpu_pm_fns->save_count * sizeof(unsigned long),
-                            GFP_KERNEL);
+       sleep_save = kmalloc_array(pxa_cpu_pm_fns->save_count,
+                                  sizeof(*sleep_save),
+                                  GFP_KERNEL);
        if (!sleep_save) {
                printk(KERN_ERR "failed to alloc memory for pm save\n");
                return -ENOMEM;