From: Bjorn Andersson Date: Tue, 27 Mar 2018 21:06:42 +0000 (-0700) Subject: rpmsg: Only invoke announce_create for rpdev with endpoints X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=7586516ca043d55ed1ca563df72bc216c948cad4;p=openwrt%2Fstaging%2Fblogic.git 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 --- diff --git a/drivers/rpmsg/rpmsg_core.c b/drivers/rpmsg/rpmsg_core.c index 5a081762afcc..920a02f0462c 100644 --- a/drivers/rpmsg/rpmsg_core.c +++ b/drivers/rpmsg/rpmsg_core.c @@ -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;