mtd: error return -EIO instead of EIO
authorRoel Kluin <roel.kluin@gmail.com>
Wed, 11 Nov 2009 20:47:06 +0000 (21:47 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 30 Nov 2009 09:51:44 +0000 (09:51 +0000)
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>
drivers/mtd/maps/physmap.c
drivers/mtd/maps/vmu-flash.c
drivers/mtd/nand/atmel_nand.c

index 3f13a9673e7f4b94fc298cb8f0ff3450a1d16a7b..d9603f7f96522e66fdb6647a77f323371d2af9ed 100644 (file)
@@ -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;
                }
 
index 1008462c3f7c4611e151bf2324969bd883742941..82afad0ddd726ca0efd0dbaa6e6a0c040219d718 100644 (file)
@@ -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;
        }
 
index 4f62d207b87bfd98aa118b521dc297ec4c85604e..524e6c9e0672a2b800a91d4858269cc4f4e745b7 100644 (file)
@@ -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;
        }