diff options
author | Arnaud Pouliquen <arnaud.pouliquen@foss.st.com> | 2021-07-12 14:39:12 +0200 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2021-09-13 10:24:31 -0500 |
commit | 537d3af1bee8ad1415fda9b622d1ea6d1ae76dfa (patch) | |
tree | fef060ea8a22d08b00d550a8311e97350d43aef0 | |
parent | 08de420a8014ed3fd83b2436f7e8bd9c4fcd9afe (diff) | |
download | linux-537d3af1bee8ad1415fda9b622d1ea6d1ae76dfa.tar.gz linux-537d3af1bee8ad1415fda9b622d1ea6d1ae76dfa.tar.bz2 linux-537d3af1bee8ad1415fda9b622d1ea6d1ae76dfa.zip |
rpmsg: Fix rpmsg_create_ept return when RPMSG config is not defined
According to the description of the rpmsg_create_ept in rpmsg_core.c
the function should return NULL on error.
Fixes: 2c8a57088045 ("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>
-rw-r--r-- | include/linux/rpmsg.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/rpmsg.h b/include/linux/rpmsg.h index d97dcd049f18..a8dcf8a9ae88 100644 --- a/include/linux/rpmsg.h +++ b/include/linux/rpmsg.h @@ -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) |