Commit a9cd9c04 authored by Sinclair Yeh's avatar Sinclair Yeh

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
......@@ -300,6 +300,9 @@ static int vmw_recv_msg(struct rpc_channel *channel, void **msg,
break;
}
if (retries == RETRIES)
return -EINVAL;
*msg_len = reply_len;
*msg = reply;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment