@@ -247,7 +247,7 @@ static int fill_art(char __user *ubuf)
ret = acpi_parse_art(acpi_thermal_rel_handle, &count, &arts, false);
if (ret)
goto free_art;
- art_len = count * sizeof(union art_object);
+ art_len = count * sizeof(*art_user);
art_user = kzalloc(art_len, GFP_KERNEL);
if (!art_user) {
ret = -ENOMEM;
@@ -283,7 +283,7 @@ static int fill_trt(char __user *ubuf)
ret = acpi_parse_trt(acpi_thermal_rel_handle, &count, &trts, false);
if (ret)
goto free_trt;
- trt_len = count * sizeof(union trt_object);
+ trt_len = count * sizeof(*trt_user);
trt_user = kzalloc(trt_len, GFP_KERNEL);
if (!trt_user) {
ret = -ENOMEM;