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 d93eee2..1ef937d 100644 (file)
@@ -96,12 +96,12 @@ static int pkg_temp_debugfs_init(void)
                return -ENOENT;
 
        d = debugfs_create_u32("pkg_thres_interrupt", S_IRUGO, debugfs,
-                               (u32 *)&pkg_interrupt_cnt);
+                              &pkg_interrupt_cnt);
        if (!d)
                goto err_out;
 
        d = debugfs_create_u32("pkg_thres_work", S_IRUGO, debugfs,
-                               (u32 *)&pkg_work_cnt);
+                              &pkg_work_cnt);
        if (!d)
                goto err_out;
 
@@ -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;