aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-03-16 14:18:53 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-03-18 06:51:42 -0400
commitb1a56b331aec59be04f25ac99694d855d591c539 (patch)
tree8b4df0abdab4c07c84ff837385980aa39d93eb24 /sound
parent2a3887f7015b547ad8195391d1f6c2136062be32 (diff)
ASoC: Remove bogus check for register validity in debugfs write
Since not all registers need to be cached and the cache is entirely optional anyway we shouldn't be checking that a register is in the cached range. If the register is invalid then the actual I/O code can determine that and report an error. Similarly, the step size can and should be enforced by the lower level code if it's important. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-core.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 17efacdb248a..4dda58926bc5 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -259,8 +259,6 @@ static ssize_t codec_reg_write_file(struct file *file,
259 while (*start == ' ') 259 while (*start == ' ')
260 start++; 260 start++;
261 reg = simple_strtoul(start, &start, 16); 261 reg = simple_strtoul(start, &start, 16);
262 if ((reg >= codec->driver->reg_cache_size) || (reg % step))
263 return -EINVAL;
264 while (*start == ' ') 262 while (*start == ' ')
265 start++; 263 start++;
266 if (strict_strtoul(start, 16, &value)) 264 if (strict_strtoul(start, 16, &value))