UBI: fix resource de-allocation
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tue, 20 Jan 2009 16:04:09 +0000 (18:04 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Fri, 17 Jul 2009 13:04:18 +0000 (16:04 +0300)
commitebccd2dd2e56fc2a0db5b594ececb76cccfd2c7e
tree21a699166dbf811ef7042967b58ac19b73221d1e
parentbdad29c271911a697761bc665380f75fac0975e7
UBI: fix resource de-allocation

GregKH asked to fix UBI which has fake device release method. Indeed,
we have to free UBI device description object from the release method,
because otherwise we'll oops is someone opens a UBI device sysfs file,
then the device is removed, and he reads the file. With this fix, he
will get -ENODEV instead of an oops.

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