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.

BUG=chrome-os-partner:54432
TEST=Suspend can be aborted when the cli->mutex is on contension

Change-Id: I4b4ac4f77ac02914f882fb6f5d55fdb82db148f7
Signed-off-by: Vince Hsu <vince.h@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/358336
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Ajay Dudani <adudani@google.com>
1 file changed