summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorDanny Smith <danny.smith@axis.com>2018-08-23 10:26:20 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-18 09:18:13 +0200
commit64458ca97124915cea2327766219f55ef846d2f9 (patch)
treef7bc1e8a10d087829899bed88b7bdff6e9d44d4a /sound
parent4a7f15b6d5faca90558146b3f6a3b388ef16c5ea (diff)
ASoC: sigmadsp: safeload should not have lower byte limit
[ Upstream commit 5ea752c6efdf5aa8a57aed816d453a8f479f1b0a ] 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> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
-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,
struct sigmadsp_control *ctrl, void *data)
{
/* safeload loads up to 20 bytes in a atomic operation */
- if (ctrl->num_bytes > 4 && ctrl->num_bytes <= 20 && sigmadsp->ops &&
- sigmadsp->ops->safeload)
+ if (ctrl->num_bytes <= 20 && sigmadsp->ops && sigmadsp->ops->safeload)
return sigmadsp->ops->safeload(sigmadsp, ctrl->addr, data,
ctrl->num_bytes);
else