UBI: fix resource de-allocation
commit36b477d005fbda29e7581c3cef7ee31a59d8970b
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tue, 20 Jan 2009 16:04:09 +0000 (20 18:04 +0200)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tue, 20 Jan 2009 16:13:53 +0000 (20 18:13 +0200)
treecacdcc1b18bfce9f627a87c115d4c6192a626b8b
parent8c4c19f1367435afdc16ac122a2a95a4d6cff9f0
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