ubifs: fix small error path mismatch

In do_readpage(), don't free 'dn' if its allocation failed.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
This commit is contained in:
Daniel Mack 2009-06-04 19:44:12 +02:00 committed by Wolfgang Denk
parent de7cf709eb
commit 165f9859b6
1 changed files with 2 additions and 4 deletions

View File

@ -554,10 +554,8 @@ static int do_readpage(struct ubifs_info *c, struct inode *inode, struct page *p
}
dn = kmalloc(UBIFS_MAX_DATA_NODE_SZ, GFP_NOFS);
if (!dn) {
err = -ENOMEM;
goto error;
}
if (!dn)
return -ENOMEM;
i = 0;
while (1) {