summaryrefslogtreecommitdiff
path: root/drivers/video/tegra
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/tegra')
-rw-r--r--drivers/video/tegra/host/nvhost_acm.c4
-rw-r--r--drivers/video/tegra/nvmap/nvmap_handle.c2
2 files changed, 2 insertions, 4 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);
diff --git a/drivers/video/tegra/nvmap/nvmap_handle.c b/drivers/video/tegra/nvmap/nvmap_handle.c
index 1c5e61ccd45d..1a6aec5ae998 100644
--- a/drivers/video/tegra/nvmap/nvmap_handle.c
+++ b/drivers/video/tegra/nvmap/nvmap_handle.c
@@ -904,7 +904,7 @@ void nvmap_free_handle_id(struct nvmap_client *client, unsigned long id)
nvmap_err(client, "%s freeing pinned handle %p\n",
current->group_leader->comm, h);
- while (pins--)
+ while (pins-- > 0)
nvmap_unpin_handles(client, &ref->handle, 1);
if (h->owner == client)