aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanny Smith <danny.smith@axis.com>2018-08-23 04:26:20 -0400
committerMark Brown <broonie@kernel.org>2018-08-28 15:19:20 -0400
commit5ea752c6efdf5aa8a57aed816d453a8f479f1b0a (patch)
tree267e54d8685c4178b17c5ec344fc4ed7f05f6834
parent960cdd50ca9fdfeb82c2757107bcb7f93c8d7d41 (diff)
ASoC: sigmadsp: safeload should not have lower byte limit
Fixed range in safeload conditional to allow safeload to up to 20 bytes, without a lower limit. Signed-off-by: Danny Smith <dannys@axis.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/sigmadsp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/codecs/sigmadsp.c b/sound/soc/codecs/sigmadsp.c
index d53680ac78e4..6df158669420 100644
--- a/sound/soc/codecs/sigmadsp.c
+++ b/sound/soc/codecs/sigmadsp.c
@@ -117,8 +117,7 @@ static int sigmadsp_ctrl_write(struct sigmadsp *sigmadsp,
117 struct sigmadsp_control *ctrl, void *data) 117 struct sigmadsp_control *ctrl, void *data)
118{ 118{
119 /* safeload loads up to 20 bytes in a atomic operation */ 119 /* safeload loads up to 20 bytes in a atomic operation */
120 if (ctrl->num_bytes > 4 && ctrl->num_bytes <= 20 && sigmadsp->ops && 120 if (ctrl->num_bytes <= 20 && sigmadsp->ops && sigmadsp->ops->safeload)
121 sigmadsp->ops->safeload)
122 return sigmadsp->ops->safeload(sigmadsp, ctrl->addr, data, 121 return sigmadsp->ops->safeload(sigmadsp, ctrl->addr, data,
123 ctrl->num_bytes); 122 ctrl->num_bytes);
124 else 123 else