summaryrefslogtreecommitdiffstats
path: root/kernel/fs/hostfs
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/fs/hostfs')
-rw-r--r--kernel/fs/hostfs/hostfs_kern.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/fs/hostfs/hostfs_kern.c b/kernel/fs/hostfs/hostfs_kern.c
index 5a7b3229b..f34d6f5a5 100644
--- a/kernel/fs/hostfs/hostfs_kern.c
+++ b/kernel/fs/hostfs/hostfs_kern.c
@@ -959,10 +959,11 @@ static int hostfs_fill_sb_common(struct super_block *sb, void *d, int silent)
if (S_ISLNK(root_inode->i_mode)) {
char *name = follow_link(host_root_path);
- if (IS_ERR(name))
+ if (IS_ERR(name)) {
err = PTR_ERR(name);
- else
- err = read_name(root_inode, name);
+ goto out_put;
+ }
+ err = read_name(root_inode, name);
kfree(name);
if (err)
goto out_put;