diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-05-09 10:34:49 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-05-09 10:34:49 +0300 |
commit | 725d0123dfff3d7b666cf57f5d29c50addfc99d3 (patch) | |
tree | 12ec63b2c3965033f30185b4b2f5f12039a9a242 /drivers/nvmem/mxs-ocotp.c | |
parent | 8cd1f9d01cbf4f46eace90d9792e65a209c37d31 (diff) | |
parent | 44549e8f5eea4e0a41b487b63e616cb089922b99 (diff) | |
download | linux-725d0123dfff3d7b666cf57f5d29c50addfc99d3.tar.xz |
Merge 4.6-rc7 into char-misc-testing
This resolves a merge issue with drivers/hv/ring_buffer.c
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/nvmem/mxs-ocotp.c')
-rw-r--r-- | drivers/nvmem/mxs-ocotp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nvmem/mxs-ocotp.c b/drivers/nvmem/mxs-ocotp.c index 8ba19bba3156..2bb3c5799ac4 100644 --- a/drivers/nvmem/mxs-ocotp.c +++ b/drivers/nvmem/mxs-ocotp.c @@ -94,7 +94,7 @@ static int mxs_ocotp_read(void *context, const void *reg, size_t reg_size, if (ret) goto close_banks; - while (val_size) { + while (val_size >= reg_size) { if ((offset < OCOTP_DATA_OFFSET) || (offset % 16)) { /* fill up non-data register */ *buf = 0; @@ -103,7 +103,7 @@ static int mxs_ocotp_read(void *context, const void *reg, size_t reg_size, } buf++; - val_size--; + val_size -= reg_size; offset += reg_size; } |