aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd/nand
diff options
context:
space:
mode:
authorArtem Bityutskiy2011-04-18 07:50:37 +0300
committerDavid Woodhouse2011-05-25 01:53:45 +0100
commit94735ec4044a6d318b83ad3c5794e931ed168d10 (patch)
treea5704163f225330f25102e8daf5668b2215c86ed /drivers/mtd/nand
parent5c39c4c54c585e13a8d6b5a8f64af682e7c68091 (diff)
mtd: mtd_blkdevs: fix error path in blktrans_open
The 'blktrans_open()' does not handle possible '__get_mtd_device()' failures because it does not check the error code. Moreover, the 'dev->tr->open()' failures are not handled correctly because in this case the function just goes ahead and gets the mtd device, then returns an error. But Instead, it should _not_ try to get the mtd device, then it should put back the module and the kref. This patch fixes the issue. Note, I only compile-tested it. This patch was inspired by a bug report about a similar issue in 2.6.34 kernels sent by Mike Turner <admin@islandsoftware.co.uk> to the MTD mailing list: http://lists.infradead.org/pipermail/linux-mtd/2011-April/034980.html Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand')
0 files changed, 0 insertions, 0 deletions