Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a848b0e7 authored by Surajit Podder's avatar Surajit Podder Committed by Gerrit - the friendly Code Review server
Browse files

msm: vidc: Return correct error code from venus_hfi_suspend



Return -EBUSY from venus_hfi_suspend if venus power is enabled
after flushing pm workqueue, otherwise return 0, indicating
success.

Change-Id: Ifaee051ad9a1054d9d95fc9fcd3503983f2ef8de
Signed-off-by: default avatarSurajit Podder <spodder@codeaurora.org>
parent d24550bb
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1301,8 +1301,12 @@ static int venus_hfi_suspend(void *dev)
	}

	dprintk(VIDC_DBG, "Suspending Venus\n");
	rc = flush_delayed_work(&venus_hfi_pm_work);
	flush_delayed_work(&venus_hfi_pm_work);

	mutex_lock(&device->lock);
	if (device->power_enabled)
		rc = -EBUSY;
	mutex_unlock(&device->lock);
	return rc;
}