From patchwork Thu Sep 14 13:01:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 722616 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CB793EE0205 for ; Thu, 14 Sep 2023 13:03:24 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 87685A4B; Thu, 14 Sep 2023 15:02:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 87685A4B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1694696602; bh=7J6zGfmKiKybIvvJHZv7azTE81gKt5XfGe/TdLIfMPw=; h=From:To:Cc:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=DRMxLlUU246FwaDVhIEOj1+2YhrmIJfjA3d7bdUlbcjYGpCxdRm/4cjG1xXFIVbpe 0Vb1eKiWox54uIibwa4LV7s4E86nOV8z24TOz7BjjiYeOmpWbiqzlaCEbByTifqirk Ea2+b8BZLlyW73UTIuZmv3x7mJYRoX+/V+Te5LIw= Received: by alsa1.perex.cz (Postfix, from userid 50401) id A11F3F80141; Thu, 14 Sep 2023 15:01:57 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 7DB15F80425; Thu, 14 Sep 2023 15:01:55 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6655DF80425; Thu, 14 Sep 2023 15:01:47 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id D471CF80212 for ; Thu, 14 Sep 2023 15:01:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D471CF80212 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=hcH36OWO DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694696502; x=1726232502; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=7J6zGfmKiKybIvvJHZv7azTE81gKt5XfGe/TdLIfMPw=; b=hcH36OWO/uyMZ1P7IchPdhIIRPOgThS/fbaU2aJq28tkl6gZ37lSgSYW 2K10v+SGiItChir9zGPvLO2cSB4fqJ3FFQit1pI0me8tU0/PdlfshFxIt BRCshewryBYF+vR5+LZNTLcinlK+PYpUReTLpybQ7atVniyqp8fyuecnz oN9iTekoqCI/+TgJtVSGxfxX3fd+A7Oz0jvrLw3fLmM+GGt4vQ3nAnsC+ QJencnSzIDkMoMxkqTV4UeEwbTGJ4INiGkB3n7um6lSkqpxrJ5bfli+Am AWg4TXZHR/V0Oy8JoeM7oDA81aMWz7W6dsuIfmalqs4Oi4oMvmjhUj9Ku w==; X-IronPort-AV: E=McAfee;i="6600,9927,10833"; a="442971513" X-IronPort-AV: E=Sophos;i="6.02,146,1688454000"; d="scan'208";a="442971513" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2023 06:01:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10833"; a="918241169" X-IronPort-AV: E=Sophos;i="6.02,146,1688454000"; d="scan'208";a="918241169" Received: from pakurapo-mobl3.ger.corp.intel.com (HELO pujfalus-desk.ger.corp.intel.com) ([10.252.37.8]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2023 06:01:35 -0700 From: Peter Ujfalusi To: lgirdwood@gmail.com, broonie@kernel.org Cc: alsa-devel@alsa-project.org, pierre-louis.bossart@linux.intel.com, ranjani.sridharan@linux.intel.com, kai.vehmanen@linux.intel.com, yung-chuan.liao@linux.intel.com Subject: [PATCH] ASoC: SOF: ipc4-topology: fix wrong sizeof argument Date: Thu, 14 Sep 2023 16:01:40 +0300 Message-ID: <20230914130140.1128-1-peter.ujfalusi@linux.intel.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Message-ID-Hash: 4TZBP2MHWX2EB7JTO7QBQEZ4W6MNGIZ2 X-Message-ID-Hash: 4TZBP2MHWX2EB7JTO7QBQEZ4W6MNGIZ2 X-MailFrom: peter.ujfalusi@linux.intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Bard Liao available_fmt is a pointer. Fixes: 4fdef47a44d6 ("ASoC: SOF: ipc4-topology: Add new tokens for input/output pin format count") Signed-off-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart --- sound/soc/sof/ipc4-topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sof/ipc4-topology.c b/sound/soc/sof/ipc4-topology.c index f2a30cd31378..7cb63e6b24dc 100644 --- a/sound/soc/sof/ipc4-topology.c +++ b/sound/soc/sof/ipc4-topology.c @@ -231,7 +231,7 @@ static int sof_ipc4_get_audio_fmt(struct snd_soc_component *scomp, ret = sof_update_ipc_object(scomp, available_fmt, SOF_AUDIO_FMT_NUM_TOKENS, swidget->tuples, - swidget->num_tuples, sizeof(available_fmt), 1); + swidget->num_tuples, sizeof(*available_fmt), 1); if (ret) { dev_err(scomp->dev, "Failed to parse audio format token count\n"); return ret;