diff mbox series

ACPI: arm64: Calculate size from pointer instead of struct

Message ID 20240830071110.120350-1-riyandhiman14@gmail.com
State New
Headers show
Series ACPI: arm64: Calculate size from pointer instead of struct | expand

Commit Message

Riyan Dhiman Aug. 30, 2024, 7:11 a.m. UTC
Calculate the size from pointer instead of struct to adhere to
kernel coding style.

Issue reported in checkpatch

This commit has no functional changes.

Signed-off-by: Riyan Dhiman <riyandhiman14@gmail.com>
---
 drivers/acpi/arm64/iort.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
index 1b39e9ae7ac1..6a87ec243c56 100644
--- a/drivers/acpi/arm64/iort.c
+++ b/drivers/acpi/arm64/iort.c
@@ -56,7 +56,7 @@  static inline int iort_set_fwnode(struct acpi_iort_node *iort_node,
 {
 	struct iort_fwnode *np;
 
-	np = kzalloc(sizeof(struct iort_fwnode), GFP_ATOMIC);
+	np = kzalloc(sizeof(*np), GFP_ATOMIC);
 
 	if (WARN_ON(!np))
 		return -ENOMEM;