android_kernel_oneplus_msm8998/drivers/nvmem
Jorge Ramirez-Ortiz 742cb74bf1 nvmem: core: fix read buffer in place
[ Upstream commit 2fe518fecb3a4727393be286db9804cd82ee2d91 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-06-22 08:18:20 +02:00
..
core.c nvmem: core: fix read buffer in place 2019-06-22 08:18:20 +02:00
imx-ocotp.c nvmem: imx-ocotp: Fix wrong register size 2017-08-06 19:19:46 -07:00
Kconfig nvmem: Adding bindings for rockchip-efuse 2015-10-04 12:08:14 +01:00
Makefile nvmem: Adding bindings for rockchip-efuse 2015-10-04 12:08:14 +01:00
mxs-ocotp.c nvmem: mxs-ocotp: fix buffer overflow in read 2016-05-11 11:21:21 +02:00
qfprom.c nvmem: qfprom: Add Qualcomm QFPROM support. 2015-08-05 13:44:23 -07:00
rockchip-efuse.c nvmem: rockchip_efuse_regmap_config can be static 2015-10-04 12:08:14 +01:00
sunxi_sid.c nvmem: sunxi: Check for memory allocation failure 2015-10-04 12:09:43 +01:00
vf610-ocotp.c nvmem: Add Vybrid OCOTP support 2015-10-04 12:06:13 +01:00