diff mbox

[1/2] sh/intc: Improve a size determination in add_virq_to_pirq()

Message ID 359e6a4f-66e3-87a2-0c55-8d57e9d1101f@users.sourceforge.net (mailing list archive)
State New, archived
Headers show

Commit Message

SF Markus Elfring May 16, 2017, 6:54 p.m. UTC
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 16 May 2017 19:56:47 +0200

Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/sh/intc/virq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/sh/intc/virq.c b/drivers/sh/intc/virq.c
index 35bbe288ddb4..2079425c95ed 100644
--- a/drivers/sh/intc/virq.c
+++ b/drivers/sh/intc/virq.c
@@ -93,5 +93,5 @@  static int add_virq_to_pirq(unsigned int irq, unsigned int virq)
 		last = &entry->next;
 	}
 
-	entry = kzalloc(sizeof(struct intc_virq_list), GFP_ATOMIC);
+	entry = kzalloc(sizeof(*entry), GFP_ATOMIC);
 	if (!entry) {