platform/x86: wmi: use sizeof(*p) in allocation
RFC PATCH 19/30 platform/x86: wmi: use sizeof(*p) in allocation
As per the coding style guide, the preferred way to pass the size of objects to allocator functions is sizeof(*p). Use that.
Signed-off-by Barnabás Pőcze <[email protected]>
--- drivers/platform/x86/wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/wmi.c +1 -1
@@ -1176,7 +1176,7 @@ static int parse_wdg(struct device *wmi_bus_dev, struct acpi_device *device)if (guid_already_parsed (device, &gblock[i].guid))continue ; - wblock =kzalloc (sizeof (struct wmi_block ),GFP_KERNEL ); + wblock =kzalloc (sizeof (*wblock),GFP_KERNEL );if (!wblock) { retval = -ENOMEM ;break ;
--
2.33.0