rpmsgdev: fix export null issue when rpmsgdev init

check rpmsgdev export null or not

Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
This commit is contained in:
yezhonghui
2024-12-11 22:54:27 +08:00
committed by Xiang Xiao
parent 806c881595
commit ceeeb73bd9

View File

@@ -163,7 +163,8 @@ static int rpmsgdev_open_handler(FAR struct rpmsg_endpoint *ept,
}
msg->header.result = file_open(&dev->file,
export->localpath,
export ? export->localpath :
strchr(ept->name, '/'),
msg->flags, 0);
if (msg->header.result < 0)
{