summaryrefslogtreecommitdiffstats
path: root/certs/Makefile
diff options
context:
space:
mode:
authorKrzysztof Adamski <krzysztof.adamski@nokia.com>2017-11-30 15:09:15 +0100
committerMark Brown <broonie@kernel.org>2017-12-19 10:55:40 +0000
commit4c90f297ffcffb84e8667e4f447aeaba52a37220 (patch)
treebeed486acac68d84f5990beb84afad66dfa70689 /certs/Makefile
parent4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323 (diff)
downloadlinux-4c90f297ffcffb84e8667e4f447aeaba52a37220.tar.bz2
regmap: use proper part of work_buf for storing val
The map->work_buf is a buffer preallocated in __regmap_init() with size allowing it to store all 3 parts of a buffer - reg, pad and val. While reg and val parts are always properly setup before each transaction, the pad part is left at its default value (zeros). Until it is overwritten, that is. _regmap_bus_read(), when calling _regmap_raw_read() uses beginning of work_buf as a place to store data read. Usually that is fine but if val_bits > reg_bits && pad_bits > 0, padding area of work_buf() may get overwritten. Since padding is not zeroed before each transaction, garbage will be used on next calls. This patch moves the val pointer used for _regmap_raw_read() to point to a part of work_buf intended for storing value read. Signed-off-by: Krzysztof Adamski <krzysztof.adamski@nokia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'certs/Makefile')
0 files changed, 0 insertions, 0 deletions