]> Git Repo - linux.git/commitdiff
rpmsg: rpmsg_create_ept() returns NULL on error
authorBjorn Andersson <[email protected]>
Mon, 13 Feb 2017 08:44:27 +0000 (00:44 -0800)
committerBjorn Andersson <[email protected]>
Mon, 13 Feb 2017 08:52:54 +0000 (00:52 -0800)
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 <[email protected]>
Signed-off-by: Bjorn Andersson <[email protected]>
drivers/rpmsg/rpmsg_core.c

index 3bf1418683b1828e3313d98f22bd717ad5d859ee..600f5f9f743100d459ec547ccaa1f6a96c632cd3 100644 (file)
@@ -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);
 }
This page took 0.062392 seconds and 4 git commands to generate.