[media] media: ti-vpe: vpdma: fix a timeout loop

The check assumes that we end on zero but actually we end on -1.  Change
the post-op to a pre-op so that we do end on zero.  Techinically now we
only loop 499 times instead of 500 but that's fine.

Fixes: dc12b12435 ("[media] media: ti-vpe: vpdma: Add abort channel desc and cleanup APIs")

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
Dan Carpenter 2016-11-25 19:28:34 -02:00 committed by Mauro Carvalho Chehab
parent d39e74fdcd
commit 062c5fff31
1 changed files with 1 additions and 1 deletions

View File

@ -453,7 +453,7 @@ int vpdma_list_cleanup(struct vpdma_data *vpdma, int list_num,
if (ret)
return ret;
while (vpdma_list_busy(vpdma, list_num) && timeout--)
while (vpdma_list_busy(vpdma, list_num) && --timeout)
;
if (timeout == 0) {