UBIFS: make ubifs_lpt_init clean-up in case of failure
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Fri, 18 May 2012 11:32:36 +0000 (14:32 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Thu, 21 Jun 2012 11:46:15 +0000 (14:46 +0300)
commit5d680b83a9fbb06963653591e5df4f958f51e294
treebda9362c4de995c3049bd9395f0c2e50030e8e25
parentd6484b37eebcad0d79ad23479872be9d4a06ed73
UBIFS: make ubifs_lpt_init clean-up in case of failure

Most functions in UBIFS follow the following designn pattern: if the function
allocates multiple resources, and failss at some point, it frees what it has
allocated and returns an error. So the caller can rely on the fact that the
callee has cleaned up everything after own failure.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Acked-by: Sidney Amani <seed95@gmail.com>
fs/ubifs/lpt.c