diff options
author | Javier Martinez Canillas <javier.martinez@collabora.co.uk> | 2014-08-18 15:09:02 +0200 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-08-18 11:39:27 -0500 |
commit | ba1b53feb8cacbd84bcf0e48925e30ad29e141a6 (patch) | |
tree | 794e0535f93a355853484f60b84973d4625616a9 /crypto/tea.c | |
parent | 275876e208e28abf4b96ec89030e482b1331ee75 (diff) |
regmap: Fix DT endianess parsing logic
Commit d647c199510c ("regmap: add DT endianness binding support.")
added support to parse the device endianness from the device tree
but unfortunately the added logic doesn't have the same semantics
than the old code. This leads to a NULL dereference pointer error
when these properties are not provided by the Device Tree:
Unable to handle kernel NULL pointer dereference at virtual address 00000044
pgd = c0004000
[00000044] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 5 PID: 1 Comm: swapper/0 Not tainted 3.17.0-rc1-next-20140818ccu #671
task: ea412800 ti: ea484000 task.ti: ea484000
PC is at regmap_update_bits+0xc/0x5c
The problem is that platforms that rely on the default value now
gets different values due two related issues in the current code:
a) It only parses the endianness from DT for the regmap registers
and not for the regmap values but it checks unconditionally in
both cases if the resulting endiannes is REGMAP_ENDIAN_NATIVE.
b) REGMAP_ENDIAN_NATIVE is not even a valid DT property according
to the regmap DT binding documentation so it shouldn't be set.
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'crypto/tea.c')
0 files changed, 0 insertions, 0 deletions