drm/vmwgfx: Add a check to handle host message failure
authorSinclair Yeh <syeh@vmware.com>
Wed, 29 Jun 2016 23:31:01 +0000 (16:31 -0700)
committerSinclair Yeh <syeh@vmware.com>
Fri, 1 Jul 2016 17:47:47 +0000 (10:47 -0700)
commita9cd9c044aa90ba2b31d1bf3e3432f38fb1d25fe
tree48027336cfde7b01894711086e59caa183156594
parent81e257e964268d050f8e9188becd44d50f241d72
drm/vmwgfx: Add a check to handle host message failure

Discovered by static code analysis tool.  If for some reason communication
with the host fails more than preset number of retries, return an error
instead of return garbage.

Signed-off-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
drivers/gpu/drm/vmwgfx/vmwgfx_msg.c