diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2022-08-31 16:03:26 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2022-09-03 20:53:17 +0200 |
commit | 895a4d6ce17b377316ebe7e7090efc1ce9ffd1fe (patch) | |
tree | 891e8d9f1aee83be77a73aa7e0a6f293d4f4f358 /drivers/acpi/acpi_platform.c | |
parent | ACPI: platform: Remove redundant print on -ENOMEM (diff) | |
download | linux-895a4d6ce17b377316ebe7e7090efc1ce9ffd1fe.tar.xz linux-895a4d6ce17b377316ebe7e7090efc1ce9ffd1fe.zip |
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 <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpi_platform.c')
-rw-r--r-- | drivers/acpi/acpi_platform.c | 3 |
1 files changed, 1 insertions, 2 deletions
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); |