Commit 895a4d6c authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Rafael J. Wysocki
Browse files

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 1d190148
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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);