[PATCH 1/2] sh/intc: Improve a size determination in add_virq_to_pirq()
From: SF Markus Elfring
Date: Tue May 16 2017 - 14:55:27 EST
From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxxxxxxxx>
---
drivers/sh/intc/virq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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) {
--
2.13.0