summaryrefslogtreecommitdiff
path: root/fs/ubifs/ubifs.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2009-06-04 19:44:12 +0200
committerWolfgang Denk <wd@denx.de>2009-06-09 23:11:53 +0200
commit165f9859b64ff59f0cfae3cc70a7e7ded7aaa4a7 (patch)
tree5b7c245e1a9b4cff0b817c1d8e05905ac3ede861 /fs/ubifs/ubifs.c
parentde7cf709ebd3c01fbd094e8853dabb410c0370a1 (diff)
downloadu-boot-imx-165f9859b64ff59f0cfae3cc70a7e7ded7aaa4a7.zip
u-boot-imx-165f9859b64ff59f0cfae3cc70a7e7ded7aaa4a7.tar.gz
u-boot-imx-165f9859b64ff59f0cfae3cc70a7e7ded7aaa4a7.tar.bz2
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>
Diffstat (limited to 'fs/ubifs/ubifs.c')
-rw-r--r--fs/ubifs/ubifs.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
index 91fc574..8ede188 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) {