提交 062c5fff 编写于 作者: D Dan Carpenter 提交者: Mauro Carvalho Chehab

[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: dc12b124 ("[media] media: ti-vpe: vpdma: Add abort channel desc and cleanup APIs")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NBenoit Parrot <bparrot@ti.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 d39e74fd
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册