CHROMIUM: drm/nouveau: fix incorrect return code

The mutex_trylock returns zero when the locks is on contension, and we
use it as the return code of nouveau_do_suspend directly. In that case
the system suspend will go on, but the nouveau won't do the suspend
process properly. That makes the GPU start behaving weirdly. This patch
fixes that bug by returning a proper error code.

TEST=Suspend can be aborted when the cli->mutex is on contension

Change-Id: I4b4ac4f77ac02914f882fb6f5d55fdb82db148f7
Signed-off-by: Vince Hsu <>
Reviewed-by: Tomasz Figa <>
Signed-off-by: Ajay Dudani <>
1 file changed