From: Daniel Mack Date: Thu, 4 Jun 2009 19:44:12 +0200 Subject: [U-Boot] [PATCH] ubifs: fix small error path mismatch Message-ID: <1244137452-8886-1-git-send-email-daniel@caiaq.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de In do_readpage(), don't free 'dn' if its allocation failed. Signed-off-by: Daniel Mack --- fs/ubifs/ubifs.c | 6 ++---- 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) { -- 1.6.3.1