]> git.sur5r.net Git - u-boot/commitdiff
ubifs: fix small error path mismatch
authorDaniel Mack <daniel@caiaq.de>
Thu, 4 Jun 2009 17:44:12 +0000 (19:44 +0200)
committerWolfgang Denk <wd@denx.de>
Tue, 9 Jun 2009 21:11:53 +0000 (23:11 +0200)
In do_readpage(), don't free 'dn' if its allocation failed.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
fs/ubifs/ubifs.c

index 91fc574a92aa8020022c3cb2b5cebc9c84834033..8ede188e1479f1573081e8e4828cad6fd22072dc 100644 (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) {