mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-18 23:18:20 +00:00
fs/romfs: correct error-handling code
romfs_fill_super() assumes that romfs_iget() returns NULL when it fails. romfs_iget() actually returns ERR_PTR(-ve) in that case... Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
f84398068d
commit
88a0a53d70
@ -528,7 +528,7 @@ static int romfs_fill_super(struct super_block *sb, void *data, int silent)
|
||||
pos = (ROMFH_SIZE + len + 1 + ROMFH_PAD) & ROMFH_MASK;
|
||||
|
||||
root = romfs_iget(sb, pos);
|
||||
if (!root)
|
||||
if (IS_ERR(root))
|
||||
goto error;
|
||||
|
||||
sb->s_root = d_alloc_root(root);
|
||||
|
Loading…
Reference in New Issue
Block a user