X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=drivers%2Fthermal%2Fx86_pkg_temp_thermal.c;h=1ef937d799e4f3d200dbfe9fb5a3dc2b08fd1d21;hb=34a484d58c1d0cdce4c5d63249ae89539dfad6b2;hp=1a6c88b10a396e37ee8ff7a429752fdffd4b9a50;hpb=f981c6cc14aa1c6cfd4154d2f93846bf83a4725a;p=linux-2.6-microblaze.git diff --git a/drivers/thermal/x86_pkg_temp_thermal.c b/drivers/thermal/x86_pkg_temp_thermal.c index 1a6c88b10a39..1ef937d799e4 100644 --- a/drivers/thermal/x86_pkg_temp_thermal.c +++ b/drivers/thermal/x86_pkg_temp_thermal.c @@ -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;