From: Axel Lin Date: Mon, 22 Feb 2016 11:23:52 +0000 (+0000) Subject: nvmem: imx-ocotp: Fix return value of imx_ocotp_read X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c7e3c5f861f0406aa4bc7ee4af0d789ef4a828db;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git nvmem: imx-ocotp: Fix return value of imx_ocotp_read imx_ocotp_read() should return 0 on success. Signed-off-by: Axel Lin Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c index b7971d410b60..d7796eb5421f 100644 --- a/drivers/nvmem/imx-ocotp.c +++ b/drivers/nvmem/imx-ocotp.c @@ -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)