lkml.org 
[lkml]   [2021]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] rpmsg: Fix rpmsg_create_ept return when RPMSG config is not defined
Date
This is a minor fix.

According to the description of the rpmsg_create_ept in rpmsg_core.c
the function should return NULL on error.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
---
include/linux/rpmsg.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

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)
--
2.17.1
\
 
 \ /
  Last update: 2021-06-04 18:07    [W:0.051 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site