Merge tag 'selinux-pr-20180629' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / drivers / thermal / x86_pkg_temp_thermal.c
index 1a6c88b..1ef937d 100644 (file)
@@ -516,7 +516,8 @@ static int __init pkg_temp_thermal_init(void)
                return -ENODEV;
 
        max_packages = topology_max_packages();
-       packages = kzalloc(max_packages * sizeof(struct pkg_device *), GFP_KERNEL);
+       packages = kcalloc(max_packages, sizeof(struct pkg_device *),
+                          GFP_KERNEL);
        if (!packages)
                return -ENOMEM;