Explorar o código

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 <tbergstrom@nvidia.com>
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Terje Bergstrom %!s(int64=12) %!d(string=hai) anos
pai
achega
64c173d3a2
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      drivers/gpu/host1x/job.c

+ 1 - 1
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;