mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 11:03:43 +02:00
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>
This commit is contained in:
parent
1d190148cc
commit
895a4d6ce1
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user