Skip to contentSkip to conversation

mtd: error return -EIO instead of EIO

PATCH In review Roel Kluin 2 participants 2 messages Nov 11, 2009 – Nov 13, 2009

Subsystems (3)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 mtd: error return -EIO instead of EIO

Return a negative error value instead of a positive

---
 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(-)
drivers/mtd/maps/physmap.c +1 -1
index 380648e..a5a72b2 100644
@@ -130,7 +130,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;
 		}
 
drivers/mtd/maps/vmu-flash.c +1 -1
index 1f73297..b02db6f 100644
@@ -621,7 +621,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;
 	}
 
drivers/mtd/nand/atmel_nand.c +2 -2
index f8e9975..e4aeeed 100644
@@ -464,7 +464,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;
 		}
 	}
@@ -535,7 +535,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;
 	}
 
#1 lore raw
Quoted 8 lines · Roel Kluin

Return a negative error value instead of a positive

---
 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(-)

Taken to my l2-mtd-2.6.git tree, thanks.

Signature · 2 lines
Best Regards,
Artem Bityutskiy (Артём Битюцкий)