diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-11-25 22:28:34 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-02-03 10:18:34 +0100 |
commit | 062c5fff31be2e5324067859ef24a748f59ca029 (patch) | |
tree | 772c221fde61c033200ef06fc6412e4a1df74e5e /drivers/media/platform/ti-vpe | |
parent | [media] Staging: media: platform: davinci: - Fix for memory leak (diff) | |
download | linux-062c5fff31be2e5324067859ef24a748f59ca029.tar.xz linux-062c5fff31be2e5324067859ef24a748f59ca029.zip |
[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: dc12b124353b ("[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>
Diffstat (limited to 'drivers/media/platform/ti-vpe')
-rw-r--r-- | drivers/media/platform/ti-vpe/vpdma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/ti-vpe/vpdma.c b/drivers/media/platform/ti-vpe/vpdma.c index 13bfd7184160..23472e3784ff 100644 --- a/drivers/media/platform/ti-vpe/vpdma.c +++ b/drivers/media/platform/ti-vpe/vpdma.c @@ -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) { |