hwspinlock: fix __hwspin_lock_request error path
[pandora-kernel.git] / drivers / hwspinlock / hwspinlock_core.c
index db713c0..461a0d7 100644 (file)
@@ -416,6 +416,8 @@ static int __hwspin_lock_request(struct hwspinlock *hwlock)
        ret = pm_runtime_get_sync(dev);
        if (ret < 0) {
                dev_err(dev, "%s: can't power on device\n", __func__);
+               pm_runtime_put_noidle(dev);
+               module_put(dev->driver->owner);
                return ret;
        }