Skip to content

Commit 895fb49

Browse files
RoelKluinDavid Woodhouse
authored andcommitted
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>
1 parent b2ef1a2 commit 895fb49

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎drivers/mtd/maps/physmap.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ static int physmap_flash_probe(struct platform_device *dev)
129129
info->map[i].size);
130130
if (info->map[i].virt == NULL) {
131131
dev_err(&dev->dev, "Failed to ioremap flash region\n");
132-
err = EIO;
132+
err = -EIO;
133133
goto err_out;
134134
}
135135

‎drivers/mtd/maps/vmu-flash.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ static int __devinit vmu_connect(struct maple_device *mdev)
620620

621621
card = kmalloc(sizeof(struct memcard), GFP_KERNEL);
622622
if (!card) {
623-
error = ENOMEM;
623+
error = -ENOMEM;
624624
goto fail_nomem;
625625
}
626626

‎drivers/mtd/nand/atmel_nand.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
463463
if (host->board->det_pin) {
464464
if (gpio_get_value(host->board->det_pin)) {
465465
printk(KERN_INFO "No SmartMedia card inserted.\n");
466-
res = ENXIO;
466+
res = -ENXIO;
467467
goto err_no_card;
468468
}
469469
}
@@ -534,7 +534,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
534534

535535
if ((!partitions) || (num_partitions == 0)) {
536536
printk(KERN_ERR "atmel_nand: No partitions defined, or unsupported device.\n");
537-
res = ENXIO;
537+
res = -ENXIO;
538538
goto err_no_partitions;
539539
}
540540

0 commit comments

Comments
 (0)