summaryrefslogtreecommitdiff
path: root/drivers/edac/amd64_edac_inj.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-04-18 08:50:37 +0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2011-05-25 04:53:45 +0400
commit94735ec4044a6d318b83ad3c5794e931ed168d10 (patch)
treea5704163f225330f25102e8daf5668b2215c86ed /drivers/edac/amd64_edac_inj.c
parent5c39c4c54c585e13a8d6b5a8f64af682e7c68091 (diff)
downloadlinux-94735ec4044a6d318b83ad3c5794e931ed168d10.tar.xz
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/edac/amd64_edac_inj.c')
0 files changed, 0 insertions, 0 deletions