diff options
author | Julia Lawall <julia@diku.dk> | 2009-07-28 15:54:58 (GMT) |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-09-24 11:47:37 (GMT) |
commit | 88a0a53d702b1fa39ed9e631939d2dbd92dfe486 (patch) | |
tree | 629d4b643272ca96da216eb4279d47429eaa95bb /fs | |
parent | f84398068d9c2babe41500504ef247ae07081857 (diff) | |
download | linux-fsl-qoriq-88a0a53d702b1fa39ed9e631939d2dbd92dfe486.tar.xz |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/romfs/super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/romfs/super.c b/fs/romfs/super.c index 47f132d..c117fa8 100644 --- a/fs/romfs/super.c +++ b/fs/romfs/super.c @@ -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); |