irqchip/gicv3: Handle loop timeout proper
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 14 Oct 2016 07:26:21 +0000 (10:26 +0300)
committerSasha Levin <alexander.levin@verizon.com>
Tue, 1 Nov 2016 19:14:22 +0000 (15:14 -0400)
commit9e9ca450cd93936f0a40daf66ce45e93d0873088
tree64f10d138c68dd72028208f1093ead585cb00185
parent88b6c9f4146af976bb4b9e12b137d520fdfc586e
irqchip/gicv3: Handle loop timeout proper

[ Upstream commit d102eb5c1ac5e6743b1c6d145c06a25d98ad1375 ]

The timeout loop terminates when the loop count is zero, but the decrement
of the count variable is post check. So count is -1 when we check for the
timeout and therefor the error message is supressed.

Change it to predecrement, so the error message is emitted.

[ tglx: Massaged changelog ]

Fixes: a2c225101234 ("irqchip: gic-v3: Refactor gic_enable_redist to support both enabling and disabling")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: kernel-janitors@vger.kernel.org
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/20161014072534.GA15168@mwanda
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
drivers/irqchip/irq-gic-v3.c