提交 fa04b769 编写于 作者: B Bjorn Andersson

rpmsg: rpmsg_create_ept() returns NULL on error

The parameter validation incorrectly returned an ERR_PTR(), which is not
handled by the callers to rpmsg_create_ept(), per the definition NULL
should be returned.

Fixes: 93e93244 ("rpmsg: Handle invalid parameters in public API")
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
上级 88e30752
...@@ -72,7 +72,7 @@ struct rpmsg_endpoint *rpmsg_create_ept(struct rpmsg_device *rpdev, ...@@ -72,7 +72,7 @@ struct rpmsg_endpoint *rpmsg_create_ept(struct rpmsg_device *rpdev,
struct rpmsg_channel_info chinfo) struct rpmsg_channel_info chinfo)
{ {
if (WARN_ON(!rpdev)) if (WARN_ON(!rpdev))
return ERR_PTR(-EINVAL); return NULL;
return rpdev->ops->create_ept(rpdev, cb, priv, chinfo); return rpdev->ops->create_ept(rpdev, cb, priv, chinfo);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册