linux_dsm_epyc7002/drivers/mtd
Artem Bityutskiy 0bf1c4399a UBI: fix attaching error path
In the error path of 'ubi_attach_mtd_dev()' we have a tricky situation:
we have to release things differently depending on at which point
the failure happening. Namely, if @ubi->dev is not initialized, we have
to free everything ourselves. But if it was, we should not free the @ubi
object, because it will be freed in the 'dev_release()' function. And
we did not get this situation right.

This patch introduces additional argument to the 'uif_init()' function.
On exit, this argument indicates whether the final 'free(ubi)' will
happen in 'dev_release()' or not. So the caller always knows how to
properly release the resources.

Impact: all memory is now correctly released when UBI fails to attach
        an MTD device.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2010-02-01 15:16:36 +02:00
..
chips Merge git://git.infradead.org/mtd-2.6 2009-12-16 10:23:43 -08:00
devices Merge git://git.infradead.org/mtd-2.6 2009-12-16 10:23:43 -08:00
lpddr
maps Merge git://git.infradead.org/~dwmw2/mtd-2.6.33 2010-01-24 10:31:34 -08:00
nand MIPS: eXcite: Remove platform. 2009-12-17 01:57:35 +00:00
onenand Merge git://git.infradead.org/mtd-2.6 2009-12-16 10:23:43 -08:00
tests mtd: tests: fix read, speed and stress tests on NOR flash 2010-01-13 09:06:17 +00:00
ubi UBI: fix attaching error path 2010-02-01 15:16:36 +02:00
afs.c
ar7part.c
cmdlinepart.c
ftl.c
inftlcore.c
inftlmount.c
internal.h
Kconfig
Makefile
mtd_blkdevs.c Merge git://git.infradead.org/mtd-2.6 2009-12-16 10:23:43 -08:00
mtdbdi.c
mtdblock_ro.c
mtdblock.c
mtdchar.c
mtdconcat.c
mtdcore.c
mtdcore.h
mtdoops.c kmsg_dump: Dump on crash_kexec as well 2009-12-31 19:45:04 +00:00
mtdpart.c
mtdsuper.c
nftlcore.c
nftlmount.c
ofpart.c
redboot.c
rfd_ftl.c
ssfdc.c