diff options
-rw-r--r-- | fs/ubifs/lpt.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/ubifs/lpt.c b/fs/ubifs/lpt.c index b2792e84d245..d0dfe7a0dedf 100644 --- a/fs/ubifs/lpt.c +++ b/fs/ubifs/lpt.c @@ -1269,10 +1269,9 @@ static int read_pnode(struct ubifs_info *c, struct ubifs_nnode *parent, int iip) lnum = branch->lnum; offs = branch->offs; pnode = kzalloc(sizeof(struct ubifs_pnode), GFP_NOFS); - if (!pnode) { - err = -ENOMEM; - goto out; - } + if (!pnode) + return -ENOMEM; + if (lnum == 0) { /* * This pnode was not written which just means that the LEB |