Skip to content

Commit b8418bc

Browse files
rpmsgdev: fix export null issue when rpmsgdev init
check rpmsgdev export null or not Signed-off-by: yezhonghui <[email protected]>
1 parent 88a8494 commit b8418bc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/misc/rpmsgdev_server.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,8 @@ static int rpmsgdev_open_handler(FAR struct rpmsg_endpoint *ept,
163163
}
164164

165165
msg->header.result = file_open(&dev->file,
166-
export->localpath,
166+
export ? export->localpath :
167+
strchr(ept->name, '/'),
167168
msg->flags, 0);
168169
if (msg->header.result < 0)
169170
{

0 commit comments

Comments
 (0)