--- b2792e84d2452fd37e27991b42c1ab5754044de4 +++ d0dfe7a0dedfdb5c90660f2c7b0c18fd601e5c27 @@ -1269,10 +1269,9 @@ static int read_pnode(struct ubifs_info 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