Skip to content

Commit

Permalink
rpmsg: rpmsg_create_ept() returns NULL on error
Browse files Browse the repository at this point in the history
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: 93e9324 ("rpmsg: Handle invalid parameters in public API")
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Bjorn Andersson <[email protected]>
  • Loading branch information
andersson committed Feb 13, 2017
1 parent 88e3075 commit fa04b76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/rpmsg/rpmsg_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ struct rpmsg_endpoint *rpmsg_create_ept(struct rpmsg_device *rpdev,
struct rpmsg_channel_info chinfo)
{
if (WARN_ON(!rpdev))
return ERR_PTR(-EINVAL);
return NULL;

return rpdev->ops->create_ept(rpdev, cb, priv, chinfo);
}
Expand Down

0 comments on commit fa04b76

Please sign in to comment.