mtd: error return -EIO instead of EIO
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Mon Nov 30 05:59:04 EST 2009
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=895fb49459227edbb4a4e5a2b5e9d12c34640f84
Commit: 895fb49459227edbb4a4e5a2b5e9d12c34640f84
Parent: b2ef1a2bb2eb49cd7c75b22f1ea40ead0bdfdb8a
Author: Roel Kluin <roel.kluin at gmail.com>
AuthorDate: Wed Nov 11 21:47:06 2009 +0100
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Mon Nov 30 09:51:44 2009 +0000
mtd: error return -EIO instead of EIO
Return a negative error value instead of a positive
Signed-off-by: Roel Kluin <roel.kluin at gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/maps/physmap.c | 2 +-
drivers/mtd/maps/vmu-flash.c | 2 +-
drivers/mtd/nand/atmel_nand.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c
index 3f13a96..d9603f7 100644
--- a/drivers/mtd/maps/physmap.c
+++ b/drivers/mtd/maps/physmap.c
@@ -129,7 +129,7 @@ static int physmap_flash_probe(struct platform_device *dev)
info->map[i].size);
if (info->map[i].virt == NULL) {
dev_err(&dev->dev, "Failed to ioremap flash region\n");
- err = EIO;
+ err = -EIO;
goto err_out;
}
diff --git a/drivers/mtd/maps/vmu-flash.c b/drivers/mtd/maps/vmu-flash.c
index 1008462..82afad0 100644
--- a/drivers/mtd/maps/vmu-flash.c
+++ b/drivers/mtd/maps/vmu-flash.c
@@ -620,7 +620,7 @@ static int __devinit vmu_connect(struct maple_device *mdev)
card = kmalloc(sizeof(struct memcard), GFP_KERNEL);
if (!card) {
- error = ENOMEM;
+ error = -ENOMEM;
goto fail_nomem;
}
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index 4f62d20..524e6c9 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -463,7 +463,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
if (host->board->det_pin) {
if (gpio_get_value(host->board->det_pin)) {
printk(KERN_INFO "No SmartMedia card inserted.\n");
- res = ENXIO;
+ res = -ENXIO;
goto err_no_card;
}
}
@@ -534,7 +534,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
if ((!partitions) || (num_partitions == 0)) {
printk(KERN_ERR "atmel_nand: No partitions defined, or unsupported device.\n");
- res = ENXIO;
+ res = -ENXIO;
goto err_no_partitions;
}
More information about the linux-mtd-cvs
mailing list