Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Arnaud Pouliquen and committed by
Bjorn Andersson
537d3af1 08de420a

+1 -1
+1 -1
include/linux/rpmsg.h
··· 231 231 /* This shouldn't be possible */ 232 232 WARN_ON(1); 233 233 234 - return ERR_PTR(-ENXIO); 234 + return NULL; 235 235 } 236 236 237 237 static inline int rpmsg_send(struct rpmsg_endpoint *ept, void *data, int len)