diff options
author | Bjorn Andersson | 2017-02-13 09:44:27 +0100 |
---|---|---|
committer | Bjorn Andersson | 2017-02-13 09:52:54 +0100 |
commit | fa04b769f2832bf1aeb2e04b8865f6b688a752fd (patch) | |
tree | e2b55e83225bd8851d386ab91e813caa1850c57d /drivers/rpmsg | |
parent | rpmsg: qcom: smd: Return positively when not enabled (diff) | |
download | kernel-qcow2-linux-fa04b769f2832bf1aeb2e04b8865f6b688a752fd.tar.gz kernel-qcow2-linux-fa04b769f2832bf1aeb2e04b8865f6b688a752fd.tar.xz kernel-qcow2-linux-fa04b769f2832bf1aeb2e04b8865f6b688a752fd.zip |
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: 93e9324431c9 ("rpmsg: Handle invalid parameters in public API")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/rpmsg')
-rw-r--r-- | drivers/rpmsg/rpmsg_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rpmsg/rpmsg_core.c b/drivers/rpmsg/rpmsg_core.c index 3bf1418683b1..600f5f9f7431 100644 --- a/drivers/rpmsg/rpmsg_core.c +++ b/drivers/rpmsg/rpmsg_core.c @@ -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); } |