diff options
Diffstat (limited to 'drivers/video/tegra')
-rw-r--r-- | drivers/video/tegra/host/nvhost_acm.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/video/tegra/host/nvhost_acm.c b/drivers/video/tegra/host/nvhost_acm.c index 5bde55ad2ff5..fcedb5c1a2c8 100644 --- a/drivers/video/tegra/host/nvhost_acm.c +++ b/drivers/video/tegra/host/nvhost_acm.c @@ -3,7 +3,7 @@ * * Tegra Graphics Host Automatic Clock Management * - * Copyright (c) 2010-2012, NVIDIA Corporation. All rights reserved. + * Copyright (c) 2010-2014, NVIDIA Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -219,8 +219,11 @@ void nvhost_module_busy(struct nvhost_device *dev) cancel_delayed_work(&dev->powerstate_down); dev->refcount++; - if (dev->refcount > 0 && !nvhost_module_powered(dev)) + if (unlikely(dev->refcount <= 0)) + pr_err("unbalanced refcount %d\n", dev->refcount); + if (!nvhost_module_powered(dev)) to_state_running_locked(dev); + mutex_unlock(&dev->lock); } |