rpmsg: Only invoke announce_create for rpdev with endpoints
authorBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 27 Mar 2018 21:06:42 +0000 (14:06 -0700)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Wed, 28 Mar 2018 04:54:36 +0000 (21:54 -0700)
For special rpmsg devices without a primary endpoint there is nothing to
announce so don't call the backend announce create function if we didn't
create an endpoint.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/rpmsg/rpmsg_core.c

index 5a081762afcc5af07cef291edc278a5bc91ba9ef..920a02f0462c45f520997769890351c89fcc1242 100644 (file)
@@ -442,7 +442,7 @@ static int rpmsg_dev_probe(struct device *dev)
                goto out;
        }
 
-       if (rpdev->ops->announce_create)
+       if (ept && rpdev->ops->announce_create)
                err = rpdev->ops->announce_create(rpdev);
 out:
        return err;