Message ID | 20210322121930.831408240@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3527365jai; Mon, 22 Mar 2021 05:33:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYo6DVeBiC0guNCORAQ8g0e69yUa201o/nBs17HxdUha3io5kXo7cXU3weqrk8lviq06qR X-Received: by 2002:a17:906:400b:: with SMTP id v11mr18951854ejj.194.1616416427616; Mon, 22 Mar 2021 05:33:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616416427; cv=none; d=google.com; s=arc-20160816; b=qBeWWXBhCnJxKGKDhaRu8j4wZplA7y9KB2pQl0TX+297nQ1o9A3cbHKg+2M+E6l1q2 QPN2gAo9oPFTXwzXpuB/7FuD3WUjoQGIm4GORObYPnO0IRkS+yNB6s8PInKbF/a4WtOM 5CEB4KVmeSOxRiZK56Tb9IEOIBI5HsSFzv4n045xu6zokgyfIvhlOvhbUbF0J0eoqe3k DZ9zah6ymjgjI9P8LICv62czBlwTlmEq/0ctJSgcIPKsjPXmnUWhCTSjV0uvnQ8JV31b STBOLOPzK/zBkPPpi7bKPLSxQfHQzbOhfI0+fC8SjDpCI0+fBJ2MIbHyZE1SjYrUQRcV 9rpQ== 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=Ku74VOaUXC55rJpcIECP8tXIpORCv7zlO3AfhqBJAfQ=; b=eQyRkJ4PajKqF7lRA7Uq5U0YYqIzTxO7UnYdXv8SzaG6H8N8XnkWwj7LMQ3W4P53Eq +cNPSx3dqg53I0zl2UQus5855Tk8dM5Zh/GZW8wEq0vUIj+f+0cgFtnofIXl4pR67ss6 ypCqHCaZZb4XyM0GlIP3wbkMh3pvjiYEvCHc0WfXVwaJpWEPTJegARJJl5UKHGVRFm44 mt8x9uTt3HE3R10+9kbO5ajb8jBNKSd7c4AXWe7gtwF9LTptO9eWFOttpX03FTJhiRmB H/niFAzSkyztQ5/C/nIxVVCX/7NdQnfHhtPI1GTy+HPpBrVnqlO3v5EfXwSdslrARCCv Me2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YPmrwzRM; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: <stable-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r21si11105155edy.321.2021.03.22.05.33.47; Mon, 22 Mar 2021 05:33:47 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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=YPmrwzRM; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S231157AbhCVMdX (ORCPT <rfc822;semen.protsenko@linaro.org> + 12 others); Mon, 22 Mar 2021 08:33:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:55266 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230195AbhCVMcY (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 22 Mar 2021 08:32:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E8A7E619A1; Mon, 22 Mar 2021 12:32:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1616416343; bh=yTayAIBKuIJn+gV5lv0TS3Hk7EPo/GlQvUqJXS22suA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YPmrwzRMsLUWPCmQqtqvG/svi1YZaG7JOlH9VjJgVttnxcwCYDgfc1mhAO88op1oz uLOo5OJ71vCu1u+f/gJsW4VhvsVPmFBUDVqEPMhE/gOCXHtD9+g0vh6TgUeLafl0aP IRJMjMMZcdZ7M9n4NSrbwYy1PGPjhp01N2ZgoQWE= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, John Stultz <john.stultz@linaro.org>, Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, Mark Brown <broonie@kernel.org> Subject: [PATCH 5.11 035/120] ASoC: codecs: wcd934x: add a sanity check in set channel map Date: Mon, 22 Mar 2021 13:26:58 +0100 Message-Id: <20210322121930.831408240@linuxfoundation.org> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210322121929.669628946@linuxfoundation.org> References: <20210322121929.669628946@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: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/sound/soc/codecs/wcd934x.c +++ b/sound/soc/codecs/wcd934x.c @@ -1873,6 +1873,12 @@ static int wcd934x_set_channel_map(struc wcd = snd_soc_component_get_drvdata(dai->component); + if (tx_num > WCD934X_TX_MAX || rx_num > WCD934X_RX_MAX) { + dev_err(wcd->dev, "Invalid tx %d or rx %d channel count\n", + tx_num, rx_num); + return -EINVAL; + } + if (!tx_slot || !rx_slot) { dev_err(wcd->dev, "Invalid tx_slot=%p, rx_slot=%p\n", tx_slot, rx_slot);