修复dev 文件夹mmap bug

This commit is contained in:
zhOu 2021-01-07 15:38:37 +08:00 committed by Gitee
parent e901790b32
commit 0a40c5434b
1 changed files with 1 additions and 1 deletions

View File

@ -661,7 +661,7 @@ STATUS_T OsNamedMMap(struct file *filep, LosVmMapRegion *region)
return LOS_ERRNO_VM_MAP_FAILED; return LOS_ERRNO_VM_MAP_FAILED;
} }
} else if (INODE_IS_DRIVER(inodePtr)) { } else if (INODE_IS_DRIVER(inodePtr)) {
if (inodePtr->u.i_ops->mmap) { if (inodePtr->u.i_ops && inodePtr->u.i_ops->mmap) {
LOS_SetRegionTypeDev(region); LOS_SetRegionTypeDev(region);
return inodePtr->u.i_ops->mmap(filep, region); return inodePtr->u.i_ops->mmap(filep, region);
} else { } else {