Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3691948pxv; Mon, 26 Jul 2021 09:30:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhMVShjMOIHvWyxabagn9ntKO2xFxCFgo1VErz/+8NMfidKZUglj9kPc8GD5sXuPUak3z9 X-Received: by 2002:a05:6638:100b:: with SMTP id r11mr17421505jab.85.1627317019536; Mon, 26 Jul 2021 09:30:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627317019; cv=none; d=google.com; s=arc-20160816; b=bxu2qgkJohhPBkzS18A+RGxAfXai/onCr4R/hYBCCFx4jpneTIq2oJz6CfhUkOWrE9 qEhRT2hnMAQH1CiFNW3a0EcKXcVVPEDK2rcx4T/2eYX8ZA35i2ox58RE24RednM8aFed isnA91NoJ27Z/H67eeuLPflcWAeIk00x1FMsqoBppomCcOgp4oT/VAuThLU8OnBupEaD 8ZaBxHJKwE5HdrNLHIafE5OFlShhYq4EZ/R2IqKln6b/Hx3ukBPhyAaBLaqlSwLEmQWR PGKCuNYOg2/VDYAfM7zcOgfHeDS0b1PLmrzCoWXoM8FatyXRdMsfA/8/an5MWl3v+fzd S0aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=AW3ULWkYi6SDsPkE9v9kF1lVa+Dhy3hvQCjmIHFGlbU=; b=VEUQrjbRgWcGg4PMRcY4s5HVzuGw4Fy2fc47MXPuP6h+qN+6dc+kori2LL07z6qQz7 Zkb08ljeu1htKp7yR3PEkgUpz4iGT5LBwwiFKPeQw4+7VzN+UoVKzedEkkeypMtg2PY8 t9StAQA1dR0CZlnDNg3t/Ln9yaZ6LEmOkMG9zb+ixV5wezOTb7pAk/+BDZyz1d3S6msP Lj0w++WCa27+HoWC4ixzX2+BV8h5k253FXB6eifDCAMXnJQmgx18jNuDJ/M7eYrJBT6J RxTs31itvLNet+fABkMp8TYsQze9Ruw77rsxFLYAT7JO5khpBb7GUN2ccu2fmk4pfhQX tapg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xL2q+Kh0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z4si341526ioz.87.2021.07.26.09.30.06; Mon, 26 Jul 2021 09:30:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xL2q+Kh0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238936AbhGZPsP (ORCPT + 99 others); Mon, 26 Jul 2021 11:48:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:43054 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237906AbhGZP32 (ORCPT ); Mon, 26 Jul 2021 11:29:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 35AB460F9D; Mon, 26 Jul 2021 16:09:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627315791; bh=b/7MjYTKAZtG/GgsQEyv30EaoxbWR4EB+wQ5e0UmZy4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xL2q+Kh062MoHVz3xgQIoLS3dKZOVkHeNY5dII57CWnS7orh0Fx2A9HbpY1qa9FYj YIq5uuoJSoJTie70SJ4P1/8fOJjRlKhWTgZoi2rwEWCNdCEXa04wB5IrrrbprqeraZ Vmxzury88eMAawQXZ6n+6rNrf4IfZcxYDIyQy5V8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Charles Keepax , Mark Brown , Sasha Levin Subject: [PATCH 5.13 067/223] ASoC: wm_adsp: Correct wm_coeff_tlv_get handling Date: Mon, 26 Jul 2021 17:37:39 +0200 Message-Id: <20210726153848.452679899@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210726153846.245305071@linuxfoundation.org> References: <20210726153846.245305071@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Charles Keepax [ Upstream commit dd6fb8ff2210f74b056bf9234d0605e8c26a8ac0 ] When wm_coeff_tlv_get was updated it was accidentally switch to the _raw version of the helper causing it to ignore the current DSP state it should be checking. Switch the code back to the correct helper so that users can't read the controls when they arn't available. Fixes: 73ecf1a673d3 ("ASoC: wm_adsp: Correct cache handling of new kernel control API") Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20210626155941.12251-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/wm_adsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index 3dc119daf2f6..cef05d81c39b 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -1213,7 +1213,7 @@ static int wm_coeff_tlv_get(struct snd_kcontrol *kctl, mutex_lock(&ctl->dsp->pwr_lock); - ret = wm_coeff_read_ctrl_raw(ctl, ctl->cache, size); + ret = wm_coeff_read_ctrl(ctl, ctl->cache, size); if (!ret && copy_to_user(bytes, ctl->cache, size)) ret = -EFAULT; -- 2.30.2