Skip to content

Commit bfcd1fd

Browse files
Dan CarpenterKAGA-KOKO
authored andcommitted
irqchip/gic-v5: Fix loop in gicv5_its_create_itt_two_level() cleanup path
The "i" variable in gicv5_its_create_itt_two_level() needs to be signed otherwise it can cause a forever loop in the function's cleanup path. [ lpieralisi: Reworded commit message ] Fixes: 57d7219 ("irqchip/gic-v5: Add GICv5 ITS support") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Zenghui Yu <[email protected]> Link: https://lore.kernel.org/all/[email protected]
1 parent 5a5c48e commit bfcd1fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/irqchip/irq-gic-v5-its.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ static int gicv5_its_create_itt_two_level(struct gicv5_its_chip_data *its,
191191
unsigned int num_events)
192192
{
193193
unsigned int l1_bits, l2_bits, span, events_per_l2_table;
194-
unsigned int i, complete_tables, final_span, num_ents;
194+
unsigned int complete_tables, final_span, num_ents;
195195
__le64 *itt_l1, *itt_l2, **l2ptrs;
196-
int ret;
196+
int i, ret;
197197
u64 val;
198198

199199
ret = gicv5_its_l2sz_to_l2_bits(itt_l2sz);

0 commit comments

Comments
 (0)