[tip:irq/core] irqchip/gic-v3-its: Drop redundant initialization in mk_lpi_range

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  1c73fac50d83274ebc221bc8d42b6477b3c82405
Gitweb:     https://git.kernel.org/tip/1c73fac50d83274ebc221bc8d42b6477b3c82405
Author:     Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx>
AuthorDate: Tue, 12 Mar 2019 18:33:48 +0100
Committer:  Marc Zyngier <marc.zyngier@xxxxxxx>
CommitDate: Mon, 29 Apr 2019 15:45:01 +0100

irqchip/gic-v3-its: Drop redundant initialization in mk_lpi_range

There's no reason to ask kmalloc() to zero the allocation, since all
the fields get initialized immediately afterwards. Except that there's
also not any reason to initialize the ->entry member, since the
element gets added to the lpi_range_list immediately.

Signed-off-by: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Marc Zyngier <marc.zyngier@xxxxxxx>
---
 drivers/irqchip/irq-gic-v3-its.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index be6ecd9b75da..db29df1ae92f 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -1465,9 +1465,8 @@ static struct lpi_range *mk_lpi_range(u32 base, u32 span)
 {
 	struct lpi_range *range;
 
-	range = kzalloc(sizeof(*range), GFP_KERNEL);
+	range = kmalloc(sizeof(*range), GFP_KERNEL);
 	if (range) {
-		INIT_LIST_HEAD(&range->entry);
 		range->base_id = base;
 		range->span = span;
 	}



[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux