Skip to contentSkip to conversation

nvmem: imx-ocotp: Fix return value of imx_ocotp_read

PATCH In review Axel Lin 2 participants 2 messages Feb 2, 2016 – Feb 8, 2016

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 nvmem: imx-ocotp: Fix return value of imx_ocotp_read

imx_ocotp_read() should return 0 on success.

---
 drivers/nvmem/imx-ocotp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvmem/imx-ocotp.c +1 -1
index b7971d4..d7796eb 100644
@@ -51,7 +51,7 @@ static int imx_ocotp_read(void *context, const void *reg, size_t reg_size,
 		val += 4;
 	}
 
-	return (i - index) * 4;
+	return 0;
 }
 
 static int imx_ocotp_write(void *context, const void *data, size_t count)
Signature · 1 line
2.1.4
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Axel Lin

imx_ocotp_read() should return 0 on success.

---

I will queue this patch via Greg's charmisc tree.

thanks,
srini

Quoted 17 lines
  drivers/nvmem/imx-ocotp.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvmem/imx-ocotp.c +1 -1
index b7971d4..d7796eb 100644
@@ -51,7 +51,7 @@ static int imx_ocotp_read(void *context, const void *reg, size_t reg_size,
  		val += 4;
  	}
 
-	return (i - index) * 4;
+	return 0;
  }
 
  static int imx_ocotp_write(void *context, const void *data, size_t count)