From 91eb75c90ef8acd92573ca5145fee67f1781719f Mon Sep 17 00:00:00 2001 From: Pranav Chaturvedi Date: Mon, 16 Apr 2012 09:09:44 +0530 Subject: video: early exit from update_cdma when update_cdma_locked() is invoked, CDMA is not running implies that the queue is cleared and we can return immediately. Bug 960487 Change-Id: I599027906dc405f4490590443d4f4d5a3202b5b0 Reviewed-on: http://git-master/r/96650 (cherry picked from commit f297b4812d15540f4b14c87178662a7ca6575ce9) Reviewed-on: http://git-master/r/99994 Reviewed-by: Varun Colbert Tested-by: Varun Colbert --- drivers/video/tegra/host/nvhost_cdma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/video/tegra/host/nvhost_cdma.c b/drivers/video/tegra/host/nvhost_cdma.c index 7ebb0c8b4020..f1f4405d0745 100644 --- a/drivers/video/tegra/host/nvhost_cdma.c +++ b/drivers/video/tegra/host/nvhost_cdma.c @@ -156,7 +156,9 @@ static void update_cdma_locked(struct nvhost_cdma *cdma) struct nvhost_syncpt *sp = &dev->syncpt; struct nvhost_job *job, *n; - BUG_ON(!cdma->running); + /* If CDMA is stopped, queue is cleared and we can return */ + if (!cdma->running) + return; /* * Walk the sync queue, reading the sync point registers as necessary, -- cgit v1.2.3