pm_runtime_get_sync increments usage count first and
then carry out actual resume operation. if pm_runtime_get_sync
failed needs to decrement usage count to balance count.
Bug
1459733
Change-Id: I844c59310b992c7cac12b134c772f30857c5dec3
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: http://git-master/r/368416
Reviewed-on: http://git-master/r/411248
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Tested-by: Sachin Nikam <snikam@nvidia.com>
#ifdef CONFIG_PM_RUNTIME
ret = pm_runtime_get_sync(&dev->dev);
if (ret < 0) {
+ pm_runtime_put_noidle(&dev->dev);
if (dev->dev.parent && (dev->dev.parent != &platform_bus))
nvhost_module_idle(nvhost_get_parent(dev));
nvhost_err(&dev->dev, "failed to power on, err %d", ret);