Skip to content
Snippets Groups Projects
Commit a9cd9c04 authored by Sinclair Yeh's avatar Sinclair Yeh
Browse files

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: default avatarSinclair Yeh <syeh@vmware.com>
Reviewed-by: default avatarCharmaine Lee <charmainel@vmware.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
parent 81e257e9
Branches
Tags
No related merge requests found
...@@ -300,6 +300,9 @@ static int vmw_recv_msg(struct rpc_channel *channel, void **msg, ...@@ -300,6 +300,9 @@ static int vmw_recv_msg(struct rpc_channel *channel, void **msg,
break; break;
} }
if (retries == RETRIES)
return -EINVAL;
*msg_len = reply_len; *msg_len = reply_len;
*msg = reply; *msg = reply;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment