From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.kernel.org ([198.145.29.99]:54614 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729747AbeJEXQb (ORCPT ); Fri, 5 Oct 2018 19:16:31 -0400 From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Danny Smith , Danny Smith , Mark Brown , Sasha Levin Subject: [PATCH AUTOSEL 4.9 02/14] ASoC: sigmadsp: safeload should not have lower byte limit Date: Fri, 5 Oct 2018 12:16:52 -0400 Message-Id: <20181005161704.20704-2-sashal@kernel.org> In-Reply-To: <20181005161704.20704-1-sashal@kernel.org> References: <20181005161704.20704-1-sashal@kernel.org> Sender: stable-owner@vger.kernel.org List-ID: From: Danny Smith [ 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 Acked-by: Lars-Peter Clausen Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/sigmadsp.c | 3 +-- 1 file changed, 1 insertion(+), 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 -- 2.17.1