提交 a9cd9c04 编写于 作者: S 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: NSinclair Yeh <syeh@vmware.com>
Reviewed-by: NCharmaine Lee <charmainel@vmware.com>
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册