summaryrefslogtreecommitdiff
path: root/drivers/base/regmap/regmap-debugfs.c
diff options
context:
space:
mode:
authorHan Nandor <nandor.han@vaisala.com>2019-04-02 11:01:22 +0300
committerMark Brown <broonie@kernel.org>2019-04-03 07:08:11 +0300
commit8b9f9d4dc511309918c4f6793bae7387c0c638af (patch)
tree9f7462507251668ce2e5dabcc65d45dbcb3f7277 /drivers/base/regmap/regmap-debugfs.c
parentcc6a8d69ba624f0ad7a09ed095b7bd4b86476489 (diff)
downloadlinux-8b9f9d4dc511309918c4f6793bae7387c0c638af.tar.xz
regmap: verify if register is writeable before writing operations
regmap provides a couple of ways to validate the register range used. a) maxim allowed register, b) writable/readable register tables, c) callback function that can be provided by the driver to validate a register. regmap framework should verify if registers are writeable before every write operation. However this doesn't seems to happen in every situation. The method `_regmap_raw_write_impl` is only using the `writeable_reg` callback to verify if register is writeable, ignoring the other two. This can lead to undefined behaviour since this allows to write to registers that could be declared un-writeable by using any other option. Change `_regmap_raw_write_impl` to use the `regmap_writeable` method to verify if registers are writable before the write operation. Signed-off-by: Nandor Han <nandor.han@vaisala.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/base/regmap/regmap-debugfs.c')
0 files changed, 0 insertions, 0 deletions