diff options
author | Bibek Basu <bbasu@nvidia.com> | 2014-08-01 11:29:19 +0530 |
---|---|---|
committer | Matthew Pedro <mapedro@nvidia.com> | 2014-08-01 08:35:09 -0700 |
commit | bc4bd19dd6e9de8518a784753d7b69224be0b9f6 (patch) | |
tree | df33e2e21aecf2849a24e4094129e08f4d04b9c3 /drivers/video/tegra/host/nvhost_acm.c | |
parent | ec622e35c3d4862f07e3da676401e3feefa98ecf (diff) |
nvmap: fix test condition to avoid infinite looptegra-l4t-r16-er-2014-08-01daily-2014.08.04.3_l4t/l4t-r16
Make sure that we dont enter infinite loop due to
negative value of pins in some cases. Also remove
debugging check for refcount.
Bug 1478467
Change-Id: I7df8efa5b3cf8927a0c18363add4f031aca48e48
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/450209
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Tested-by: Matthew Pedro <mapedro@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/host/nvhost_acm.c')
-rw-r--r-- | drivers/video/tegra/host/nvhost_acm.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/video/tegra/host/nvhost_acm.c b/drivers/video/tegra/host/nvhost_acm.c index fcedb5c1a2c8..edf9286566b4 100644 --- a/drivers/video/tegra/host/nvhost_acm.c +++ b/drivers/video/tegra/host/nvhost_acm.c @@ -219,9 +219,7 @@ void nvhost_module_busy(struct nvhost_device *dev) cancel_delayed_work(&dev->powerstate_down); dev->refcount++; - if (unlikely(dev->refcount <= 0)) - pr_err("unbalanced refcount %d\n", dev->refcount); - if (!nvhost_module_powered(dev)) + if (dev->refcount > 0 && !nvhost_module_powered(dev)) to_state_running_locked(dev); mutex_unlock(&dev->lock); |