From: Terje Bergstrom Date: Wed, 29 May 2013 10:26:02 +0000 (+0300) Subject: gpu: host1x: Check INCR opcode correctly X-Git-Tag: next-20130617~61^2~6 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ea2be762ed32df072458d2ada9459788d1b99b28;p=karo-tx-linux.git gpu: host1x: Check INCR opcode correctly The firewall code used a wrong loop condition (pointer to a structure) while checking INCR opcode. This patch fixes the code to use correct loop condition (number of words remaining). Signed-off-by: Terje Bergstrom Signed-off-by: Arto Merilainen Signed-off-by: Thierry Reding --- diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c index f665d679031c..2974ac8d70a7 100644 --- a/drivers/gpu/host1x/job.c +++ b/drivers/gpu/host1x/job.c @@ -330,7 +330,7 @@ static int check_incr(struct host1x_firewall *fw) u32 count = fw->count; u32 reg = fw->reg; - while (fw) { + while (count) { if (fw->words == 0) return -EINVAL;