diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-11-11 15:47:06 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-11-30 04:51:44 -0500 |
commit | 895fb49459227edbb4a4e5a2b5e9d12c34640f84 (patch) | |
tree | c6d8ce92b3c3a9797bdb8c8196a671402b829f87 | |
parent | b2ef1a2bb2eb49cd7c75b22f1ea40ead0bdfdb8a (diff) |
mtd: error return -EIO instead of EIO
Return a negative error value instead of a positive
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
-rw-r--r-- | drivers/mtd/maps/physmap.c | 2 | ||||
-rw-r--r-- | drivers/mtd/maps/vmu-flash.c | 2 | ||||
-rw-r--r-- | 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 3f13a9673e7f..d9603f7f9652 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) | |||
129 | info->map[i].size); | 129 | info->map[i].size); |
130 | if (info->map[i].virt == NULL) { | 130 | if (info->map[i].virt == NULL) { |
131 | dev_err(&dev->dev, "Failed to ioremap flash region\n"); | 131 | dev_err(&dev->dev, "Failed to ioremap flash region\n"); |
132 | err = EIO; | 132 | err = -EIO; |
133 | goto err_out; | 133 | goto err_out; |
134 | } | 134 | } |
135 | 135 | ||
diff --git a/drivers/mtd/maps/vmu-flash.c b/drivers/mtd/maps/vmu-flash.c index 1008462c3f7c..82afad0ddd72 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) | |||
620 | 620 | ||
621 | card = kmalloc(sizeof(struct memcard), GFP_KERNEL); | 621 | card = kmalloc(sizeof(struct memcard), GFP_KERNEL); |
622 | if (!card) { | 622 | if (!card) { |
623 | error = ENOMEM; | 623 | error = -ENOMEM; |
624 | goto fail_nomem; | 624 | goto fail_nomem; |
625 | } | 625 | } |
626 | 626 | ||
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c index 4f62d207b87b..524e6c9e0672 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) | |||
463 | if (host->board->det_pin) { | 463 | if (host->board->det_pin) { |
464 | if (gpio_get_value(host->board->det_pin)) { | 464 | if (gpio_get_value(host->board->det_pin)) { |
465 | printk(KERN_INFO "No SmartMedia card inserted.\n"); | 465 | printk(KERN_INFO "No SmartMedia card inserted.\n"); |
466 | res = ENXIO; | 466 | res = -ENXIO; |
467 | goto err_no_card; | 467 | goto err_no_card; |
468 | } | 468 | } |
469 | } | 469 | } |
@@ -534,7 +534,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev) | |||
534 | 534 | ||
535 | if ((!partitions) || (num_partitions == 0)) { | 535 | if ((!partitions) || (num_partitions == 0)) { |
536 | printk(KERN_ERR "atmel_nand: No partitions defined, or unsupported device.\n"); | 536 | printk(KERN_ERR "atmel_nand: No partitions defined, or unsupported device.\n"); |
537 | res = ENXIO; | 537 | res = -ENXIO; |
538 | goto err_no_partitions; | 538 | goto err_no_partitions; |
539 | } | 539 | } |
540 | 540 | ||