Skip to content

Commit

Permalink
rpmsg: Fix rpmsg_create_ept return when RPMSG config is not defined
Browse files Browse the repository at this point in the history
According to the description of the rpmsg_create_ept in rpmsg_core.c
the function should return NULL on error.

Fixes: 2c8a570 ("rpmsg: Provide function stubs for API")
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/20210712123912.10672-1-arnaud.pouliquen@foss.st.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
  • Loading branch information
Arnaud Pouliquen authored and Bjorn Andersson committed Sep 13, 2021
1 parent 08de420 commit 537d3af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/rpmsg.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ static inline struct rpmsg_endpoint *rpmsg_create_ept(struct rpmsg_device *rpdev
/* This shouldn't be possible */
WARN_ON(1);

return ERR_PTR(-ENXIO);
return NULL;
}

static inline int rpmsg_send(struct rpmsg_endpoint *ept, void *data, int len)
Expand Down

0 comments on commit 537d3af

Please sign in to comment.