浏览代码

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>
Roel Kluin 15 年之前
父节点
当前提交
895fb49459
共有 3 个文件被更改,包括 4 次插入4 次删除
  1. 1 1
      drivers/mtd/maps/physmap.c
  2. 1 1
      drivers/mtd/maps/vmu-flash.c
  3. 2 2
      drivers/mtd/nand/atmel_nand.c

+ 1 - 1
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;
 		}
 

+ 1 - 1
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;
 	}
 

+ 2 - 2
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;
 	}