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-Tag: v5.15~9055^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7586516ca043d55ed1ca563df72bc216c948cad4;p=platform%2Fkernel%2Flinux-starfive.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 5a08176..920a02f 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;