Fix a logic error introduced with last commit

This commit is contained in:
Gregory Nutt 2016-09-22 08:50:47 -06:00
parent 8221c2da64
commit 93b48ea70f
1 changed files with 2 additions and 4 deletions

View File

@ -294,7 +294,8 @@ int mount(FAR const char *source, FAR const char *target,
{
ferr("ERROR: target %s exists and is a special node\n", target);
errcode = -ENOTDIR;
goto errout_with_inode;
inode_release(mountpt_inode);
goto errout_with_semaphore;
}
}
else
@ -419,9 +420,6 @@ errout_with_mountpt:
}
#endif
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
errout_with_inode:
#endif
inode_release(mountpt_inode);
goto errout;