diff options
author | Arnaud Pouliquen <arnaud.pouliquen@foss.st.com> | 2021-07-12 15:39:12 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-11-26 13:36:14 +0300 |
commit | 7e2638ddb7a50dc5acd1fa98a9042bf019a3a7aa (patch) | |
tree | 724984793ad1cc6465bae9e7b6b4539bafe5aff0 /include | |
parent | 9f3eb0a8a5c401f2c29aa2b3b979bbaae5401190 (diff) | |
download | linux-7e2638ddb7a50dc5acd1fa98a9042bf019a3a7aa.tar.xz |
rpmsg: Fix rpmsg_create_ept return when RPMSG config is not defined
[ Upstream commit 537d3af1bee8ad1415fda9b622d1ea6d1ae76dfa ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-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 9fe156d1c018..a68972b097b7 100644 --- a/include/linux/rpmsg.h +++ b/include/linux/rpmsg.h @@ -177,7 +177,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) |