aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nvmem/imx-ocotp.c
diff options
context:
space:
mode:
authorJorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>2019-04-13 11:32:58 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-04-25 19:43:12 +0200
commit2fe518fecb3a4727393be286db9804cd82ee2d91 (patch)
tree06b55acbfb3dd5ee52b606f31ba31f80c39eb858 /drivers/nvmem/imx-ocotp.c
parentnvmem: core: add nvmem_cell_read_u16 (diff)
downloadlinux-dev-2fe518fecb3a4727393be286db9804cd82ee2d91.tar.xz
linux-dev-2fe518fecb3a4727393be286db9804cd82ee2d91.zip
nvmem: core: fix read buffer in place
When the bit_offset in the cell is zero, the pointer to the msb will not be properly initialized (ie, will still be pointing to the first byte in the buffer). This being the case, if there are bits to clear in the msb, those will be left untouched while the mask will incorrectly clear bit positions on the first byte. This commit also makes sure that any byte unused in the cell is cleared. Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/nvmem/imx-ocotp.c')
0 files changed, 0 insertions, 0 deletions