提交 895a4d6c 编写于 作者: A Andy Shevchenko 提交者: Rafael J. Wysocki

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: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 1d190148
...@@ -116,8 +116,7 @@ struct platform_device *acpi_create_platform_device(struct acpi_device *adev, ...@@ -116,8 +116,7 @@ struct platform_device *acpi_create_platform_device(struct acpi_device *adev,
if (count < 0) if (count < 0)
return NULL; return NULL;
if (count > 0) { if (count > 0) {
resources = kcalloc(count, sizeof(struct resource), resources = kcalloc(count, sizeof(*resources), GFP_KERNEL);
GFP_KERNEL);
if (!resources) { if (!resources) {
acpi_dev_free_resource_list(&resource_list); acpi_dev_free_resource_list(&resource_list);
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册