Patchwork mtd: return success on blktrans_ioctl()

login
register
mail settings
Submitter Dan Carpenter
Date May 31, 2010, 2:03 p.m.
Message ID <20100531140337.GV5483@bicker>
Download mbox | patch
Permalink /patch/54097/
State Accepted
Commit 007c2d8769139f3c9e99114219d6800aeccdfaef
Headers show

Comments

Dan Carpenter - May 31, 2010, 2:03 p.m.
There was a break missing so we returned -ENOTTY on success instead of
zero.  This was introduced by 048d8719956: "mtd: blktrans: Hotplug fixes"

Signed-off-by: Dan Carpenter <error27@gmail.com>
Artem Bityutskiy - June 13, 2010, 9:08 a.m.
On Mon, 2010-05-31 at 16:03 +0200, Dan Carpenter wrote:
> There was a break missing so we returned -ENOTTY on success instead of
> zero.  This was introduced by 048d8719956: "mtd: blktrans: Hotplug fixes"
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>

Pushed to l2-mtd-2.6.git, thanks.

Patch

diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c
index 03e19c1..a6bb586 100644
--- a/drivers/mtd/mtd_blkdevs.c
+++ b/drivers/mtd/mtd_blkdevs.c
@@ -245,6 +245,7 @@  static int blktrans_ioctl(struct block_device *bdev, fmode_t mode,
 	switch (cmd) {
 	case BLKFLSBUF:
 		ret = dev->tr->flush ? dev->tr->flush(dev) : 0;
+		break;
 	default:
 		ret = -ENOTTY;
 	}