UBI: simplify error handling
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Mon, 17 Dec 2007 13:48:49 +0000 (15:48 +0200)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Wed, 26 Dec 2007 17:15:15 +0000 (19:15 +0200)
commitdb6e5770ef0ab351a403ac26e1ab1309e58f15d7
tree29048da47919be2b8f54bf408fe900c042c9868a
parent35ad5fb76cc0a08e14068408b064103439feee36
UBI: simplify error handling

If we fail halfway through sysfs file creation, we may just call
sysfs remove function and it will delete all the files we created.
For non-existing files it will also be OK - the remove functions
just return -ENOENT.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
drivers/mtd/ubi/build.c