From: Daniel Mack Date: Thu, 4 Jun 2009 17:44:12 +0000 (+0200) Subject: ubifs: fix small error path mismatch X-Git-Tag: v2009.06-rc3~2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=165f9859b64ff59f0cfae3cc70a7e7ded7aaa4a7;p=u-boot ubifs: fix small error path mismatch In do_readpage(), don't free 'dn' if its allocation failed. Signed-off-by: Daniel Mack --- diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c index 91fc574a92..8ede188e14 100644 --- a/fs/ubifs/ubifs.c +++ b/fs/ubifs/ubifs.c @@ -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) {