From: Andy Shevchenko Date: Wed, 31 Aug 2022 14:03:26 +0000 (+0300) Subject: ACPI: platform: Use sizeof(*pointer) instead of sizeof(type) X-Git-Tag: v6.1-rc5~355^2~6^4~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=895a4d6ce17b377316ebe7e7090efc1ce9ffd1fe;p=platform%2Fkernel%2Flinux-starfive.git ACPI: platform: Use sizeof(*pointer) instead of sizeof(type) It is preferred to use sizeof(*pointer) instead of sizeof(type). The type of the variable can change and one needs not change the former (unlike the latter). No functional change intended. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/acpi/acpi_platform.c b/drivers/acpi/acpi_platform.c index 3a4d3d7772aa..5e757b53476a 100644 --- a/drivers/acpi/acpi_platform.c +++ b/drivers/acpi/acpi_platform.c @@ -116,8 +116,7 @@ struct platform_device *acpi_create_platform_device(struct acpi_device *adev, if (count < 0) return NULL; if (count > 0) { - resources = kcalloc(count, sizeof(struct resource), - GFP_KERNEL); + resources = kcalloc(count, sizeof(*resources), GFP_KERNEL); if (!resources) { acpi_dev_free_resource_list(&resource_list); return ERR_PTR(-ENOMEM);