rpmsg: Only invoke announce_create for rpdev with endpoints

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>
This commit is contained in:
Bjorn Andersson 2018-03-27 14:06:42 -07:00
parent 6ddf12d397
commit 7586516ca0

View 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;