From nobody Wed Nov 27 23:38:37 2024 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2061.outbound.protection.outlook.com [40.107.94.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 511C218C015; Mon, 7 Oct 2024 08:53:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.61 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728291231; cv=fail; b=MPiAkS23xmbrz383gfuQkGqkjb0yq14ij7KWJGT7FNusN/SgmmfZVhq9XtRzIupTfeIE49ysyGhcOsjDam8qb0qxXy5rGSa/02n5xfwV33kZVYg6XtFlY73k8LgQcE0lLGzE7yw/ILHdESGNXOv7BBciHQjYW6MYjmtH/PJI2cw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728291231; c=relaxed/simple; bh=QsrPG+nN03FY9btqeKg1xaLJbXJWbSWRHKBnbuZ9o90=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=UlJyv5+k3qLpb5Ua8ZEMzE5kZfuHqWj3/Qn6cIi6JTGz4ReBEVfYSvKU4PdpHLrOiWDEf3CS2NLd2is8n4lvL6gcVKqQV/hzZAJp2xYSKdhrjrjT+qiGO8fKmVB8GKtjpOVwDevfkhklU1UmZzIxVt8JB2bmD5RliRSdsWCnBGE= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=uoOncj5m; arc=fail smtp.client-ip=40.107.94.61 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="uoOncj5m" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KJygU34GMe2Y2RBudpf89tj1Qgy8TMxf+EEm83JyUQT5lqqDL2yT07077iTeSY95snFb9ClBRrzgIS3C6uYFqXWfqRUbXst8uLEY7GvXE9KydHo80PS8vEg9HqYqUaxCZgxRFrOVeFMe3bcZzgfShLHxWrsVPhfG8Sq7EKv/gVk4OIZSnquN1RXFm/GAd28IDFguwVKPTbE3lp9NYHqsjFxCIK/S1Rse9UysJ744rqZidjAypYJDHKkWWRCSBuBNj40BCEMOOnQGRFs6meXmlufguc5CHRZnke9CZbCGhFIts2MC0hfRs/6vt839OyzbQYOn5JdAoQmdu2zd9BMEAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=sHSN62lhcsxAa4yWYNu60F4Ro33s7NYfkZJYu252SSc=; b=W72ORHhG74FQIo6h/U5772cX/zLFgGPiYk44ZuoUCa/lz5BwxML2hDlSBDu6dcu6YIz2r2BhRBOYws2eKGoYUUQo5kWKB8C9SOo/WgcrDNe5m5bStuBZ33eg+zPuNNvDtS6DXk0tqAUHkFZgbiGQQADadecibiUx9YAQOsHe3Xn/PUpHtjPyxUs4SiCOetSEx8sUdghLy2h1xy09b84B7CnV3mjMmkoMO2QH+u+P1f/Cl/VacuV/5DM+M+PHIC/bOB6Z/tZlofTONH86fWCfMuh//YFh6ktO9Ffo07Oawuxt9sg1OZQt9k95XNOaLZHTZtlH68s/v0sg99lBEzPEig== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sHSN62lhcsxAa4yWYNu60F4Ro33s7NYfkZJYu252SSc=; b=uoOncj5mUZ93VDFol3DWDVoOsS3WjzOdB/SOmzUc/PfieMni0qEpgReo/umrzu/+j2xnI2WY9I6u/KCVNveLFaFsYCw+SdKQg1I8fwGVreTKRKkabCVpOU/rb8nh1jh4ZFQL9ODl/qRNuKy+r7m6ZGbkqfo2SSQOWEq1KUWdl+I= Received: from BL1PR13CA0023.namprd13.prod.outlook.com (2603:10b6:208:256::28) by IA1PR12MB6330.namprd12.prod.outlook.com (2603:10b6:208:3e4::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.22; Mon, 7 Oct 2024 08:53:46 +0000 Received: from BN2PEPF00004FBB.namprd04.prod.outlook.com (2603:10b6:208:256:cafe::dd) by BL1PR13CA0023.outlook.office365.com (2603:10b6:208:256::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.15 via Frontend Transport; Mon, 7 Oct 2024 08:53:46 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN2PEPF00004FBB.mail.protection.outlook.com (10.167.243.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8048.13 via Frontend Transport; Mon, 7 Oct 2024 08:53:46 +0000 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 7 Oct 2024 03:53:41 -0500 From: Vijendar Mukunda To: CC: , , , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH 1/3] ASoC: amd: acp: fix for inconsistent indenting Date: Mon, 7 Oct 2024 14:23:19 +0530 Message-ID: <20241007085321.3991149-2-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241007085321.3991149-1-Vijendar.Mukunda@amd.com> References: <20241007085321.3991149-1-Vijendar.Mukunda@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF00004FBB:EE_|IA1PR12MB6330:EE_ X-MS-Office365-Filtering-Correlation-Id: bc27497d-96fb-4db8-e16e-08dce6ad8e15 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|36860700013|376014|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?F949k9EmAZaT1Wpljzf2lhtEV6q+esmMUDeAN/JxMdE5af8zeAp3Lff9tdj1?= =?us-ascii?Q?aJVG/sDh5PYKQcAGxx6KeW/SYbR/SPkkRlxEnNzQ4JyNik9/+KM4RjjpGFJl?= =?us-ascii?Q?rW3ZNN5InH37Qa0pzBjUtpAJ4r2pNgfjqSyitp6inbYmuVZGM8DUbNumYKi3?= =?us-ascii?Q?N3OQXGJVu8YkmQNqfaZVl/yhQEuGIRzoD2wtPmDnwiOG81mchV5FaF3awH9A?= =?us-ascii?Q?xvkEm7vcgdkTu8s0vovyXhO8TKO3AudO6OmVFyEsQ2pn99yzhlf47tnVgYHu?= =?us-ascii?Q?F202ZtCls2DFyuTf9ilwDaQm+EDsiQ1YYZZouU2CljA7jE2zWk7CVgxhVdLZ?= =?us-ascii?Q?f2Gkop7s026o79Gr+Z5VDVBVG6yoESchHRtEG36N8c0tCFvfO4h2vSVl/Hrq?= =?us-ascii?Q?pB4UZdqpdXc4XhZE0nCtUGi5UtdUcsLEjheC0fPnmL7rM1nD7f4bBT82PRrC?= =?us-ascii?Q?5GNRvy9qZIycEiRoallgrouAUW5nvzPueMpPsejSW+52L4lvsRQdsNi5tsUz?= =?us-ascii?Q?SrFgFj0FtbyHKQ3832W6SlzcffhRQesvVk3dO1wTcx0BQp4HT8FnzIYz+waO?= =?us-ascii?Q?xPI8YC/Lk4HmfK51QJ0BNBAfqqnIl8Y+n2vn6jZLFbfihIoKhDDzyNU8MI0K?= =?us-ascii?Q?7tWg58Y3drFUowEWGpMXarAx62Em4MWVYypWVjdDQTUqfNAFJw4FkfCp1piO?= =?us-ascii?Q?j3/cBt9LYW6yin6lSDknFld70tpDvEqotqX7448ZqEHJ8me7SRjOyZWbdF3r?= =?us-ascii?Q?p+fUJMxQTGvX9E7JZxxsHEtjf1xk5Bwa64vSP/S6D4uOa+pWlVLuAMiUGhQy?= =?us-ascii?Q?mKeq6n/TbUfMhyYzNXI0LRODtjJoupEy4GmVTB5YDL8HT7P+rPN+CP7O9qY6?= =?us-ascii?Q?ha0WJOHxUEUNC1FvtJGokegCJXzw8M5UpqznuKjJ4ZSf19eG7Qmluh8yh6gm?= =?us-ascii?Q?OlIhdAV7NfR8WjVcaGqzfMeoUyyuXcZrq8WlDFpFIef1uNAIdxmz4f8XJOH4?= =?us-ascii?Q?8pPIJ4vB9ErscI8nsQbudlLCkPXPmkM31nSczDGnNqYAF11BUJmc1D0S9D1r?= =?us-ascii?Q?DMYGn4KDND/31i9jbmci6FFwm0ZWX9OE0XgZWrWLOwwgAb4N9fCBkgeU2E4F?= =?us-ascii?Q?Mv04IR/kiZrbFlU8l1xHZUd4kjyFCjUDUb71uoo37fJy4bJOU2CTtljRM2mZ?= =?us-ascii?Q?xfTz63YBtNepDaUi9XviN9VQQUm9iLIek0/EdwPnbALaR50qCss848ZDw4EI?= =?us-ascii?Q?qXtEGxWL/lqc703qPN0LrgP8/58mHQgy3NK+n3OwGCHBAVkJjPp02P0SPLYI?= =?us-ascii?Q?hJe5xh7zuTTeGkEgv+GZVCg8ViMXFavR9S9tcqdreQhJhARZu35E4CgPLfQs?= =?us-ascii?Q?XIXJruRsy1CjC2OGduVvDT49EYlz?= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(1800799024)(36860700013)(376014)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2024 08:53:46.6515 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bc27497d-96fb-4db8-e16e-08dce6ad8e15 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN2PEPF00004FBB.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6330 Content-Type: text/plain; charset="utf-8" Fix below Smatch static checker warning: sound/soc/amd/acp/acp-sdw-sof-mach.c:365 sof_card_dai_links_create() warn: inconsistent indenting Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/a201e871-375e-43eb-960d-5c048956c2ff@am= d.com/T/ Fixes: 6d8348ddc56e ("ASoC: amd: acp: refactor SoundWire machine driver cod= e") Signed-off-by: Vijendar Mukunda --- sound/soc/amd/acp/acp-sdw-sof-mach.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/amd/acp/acp-sdw-sof-mach.c b/sound/soc/amd/acp/acp-s= dw-sof-mach.c index 306854fb08e3..acab2675d1f5 100644 --- a/sound/soc/amd/acp/acp-sdw-sof-mach.c +++ b/sound/soc/amd/acp/acp-sdw-sof-mach.c @@ -362,7 +362,7 @@ static int sof_card_dai_links_create(struct snd_soc_car= d *card) dai_links =3D devm_kcalloc(dev, num_links, sizeof(*dai_links), GFP_KERNEL= ); if (!dai_links) { ret =3D -ENOMEM; - goto err_end; + goto err_end; } =20 card->codec_conf =3D codec_conf; --=20 2.34.1 From nobody Wed Nov 27 23:38:37 2024 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2071.outbound.protection.outlook.com [40.107.236.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E60B18C347; Mon, 7 Oct 2024 08:53:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.236.71 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728291236; cv=fail; b=KGsRf7RkwLzYLP2VZUA3J7T0lCJD/Ad4/Uc1vdrMrh1WRvFclDiErmKLZldK6y2O/BQcU2VqK/zq+LuqANgnyc+u1M2lIcvZ+fK3EKIg/G1Ciyby1VNvY/Ubip9UjzntFsRUxSA/h7X6NrTYoJJPlspIpGAxdI+0ne4EtjaYPQA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728291236; c=relaxed/simple; bh=apfTT4964LnIJyHqKMgDadof/5bd5+ZedoJd5+Vdrew=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=oSrZrdESXztHso82SJMbGwvLLq2VCn0eSnYi0JH60uYqU3t2/QjRQDBD5/GkJ/lp9ApZFTx/uKtFLoIgvYfnOUA+u6S9gW1mZG+ip4DzrqItzypOE8bMYdoYdVEpUpCDm5hghAltphCSqHCoju8EZDrh3BYVLRGeATy68A59xPc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=NrqWzQh7; arc=fail smtp.client-ip=40.107.236.71 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="NrqWzQh7" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=He+D3QbId/z/hQMliF5/IxS/6NoG7EtPVCW2wbF0olv8pW1nuB9fxmt9RjokjbYUjNIAkB1n2N+LvOzrlQXMCnY0xl4MJ5cvqhyciV3FSSOfNtaAKD83HEgld0IYYj2jK8NdTC4ns/7SwP+i9K/c9qoSiT2YaGGPdgP/5B/MLE27K0aiU4cmBMlLK6u0pFu8hZvFUBWhhBZJBg4deHw3Lws6YerL+DKonxS6rAClufsNQETTHvTkurxvzTOvB3l59/hP0gQdXb+zX7oR8TdW7B+4MJ5TsU0BvbZAXJYypL50kk5iNEvaJWsclnzj5bJX5D+rwqVK3Ic8Vqi+Y7l/QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=M9icqqq6gOnUjbija4Vs9MCWkqfX4oCnxW6yDk2+msY=; b=x2iENei+LAwxQ7WftkfioT/jOZVr5/OiOvHB4OkZ0ltZl7r61PFu/vXHrXeDcgSsFaI2fvUrQCLHLc/+BRzwl3s2zJVodCBFnWTfoykt5+DaMi0VmmcQUwOV/fTGercN0rJm9cemRG4l1ExYy85Rq3rWWYAI+tupmyB71YUjF/NwtqnFKgxQMWb3omU2VuXnBA0XEGBd/wnDWHHJswkL6mBYelH+7QZxli3FkkB0wcFRvojs8pOuY7YxN1SeYypZ9PKHbZ3xxDLwZ9+78GPX+TRt5e4iydtuJ+2QLIQJA4pVx+W6yP67HIwUW0WSj25VA9tCy78rdpwNKob0j2aLaQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M9icqqq6gOnUjbija4Vs9MCWkqfX4oCnxW6yDk2+msY=; b=NrqWzQh7EDk9fgWy9Yo7rch/IGY6/KmdGuoIknjTHyKCYlMoBGXNOCsUZU0IvynNy4ORFMB+Oq8IJpO/7O7SbQunZuKJJ4hvAFIK096ToDQ9gfeNpHQIiCqCm7JH8TSVmMcqpxfD0cQVEhZ/EWWJ5iMEdXO741cUQ1cRYbp6/o0= Received: from BL0PR02CA0054.namprd02.prod.outlook.com (2603:10b6:207:3d::31) by IA1PR12MB9064.namprd12.prod.outlook.com (2603:10b6:208:3a8::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.20; Mon, 7 Oct 2024 08:53:51 +0000 Received: from BN2PEPF00004FC0.namprd04.prod.outlook.com (2603:10b6:207:3d:cafe::c3) by BL0PR02CA0054.outlook.office365.com (2603:10b6:207:3d::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.20 via Frontend Transport; Mon, 7 Oct 2024 08:53:51 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN2PEPF00004FC0.mail.protection.outlook.com (10.167.243.186) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8048.13 via Frontend Transport; Mon, 7 Oct 2024 08:53:50 +0000 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 7 Oct 2024 03:53:46 -0500 From: Vijendar Mukunda To: CC: , , , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH 2/3] ASoC: amd: acp: fix for cpu dai index logic Date: Mon, 7 Oct 2024 14:23:20 +0530 Message-ID: <20241007085321.3991149-3-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241007085321.3991149-1-Vijendar.Mukunda@amd.com> References: <20241007085321.3991149-1-Vijendar.Mukunda@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF00004FC0:EE_|IA1PR12MB9064:EE_ X-MS-Office365-Filtering-Correlation-Id: 1be99b92-8acb-42ff-26c8-08dce6ad908a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|1800799024|376014|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?lWUBHodxu9gIm6ut9vc0TnmP0kfLbLFQ9+GhCptAwC+W22KmPNF3qfAkiBew?= =?us-ascii?Q?0+NnNAoLpzyOV6zebLhQLVWVGHII9NU594r8FrJg3dZs7KxlnlU9XInorDAx?= =?us-ascii?Q?kJghpU+Q9dgzUHnvltj9oEyiNdNaRNBdNdazdf06i4598VJi/CKya5r55aRy?= =?us-ascii?Q?R38CieuD+LNZyMc1uBUH7rJGbQb7P6phuRautPhNywMU1TuEGKac7uV71gHy?= =?us-ascii?Q?IyMs+ybX8RWYw1GvP7dDw+ECX/JvDEdVKSKYiMYvRDzuwUvhERRrb20sVLW2?= =?us-ascii?Q?iXnzwfdXFu/AxKxfVjEklKQkG9K1L2MRF0vohCVE35x4glqtvc61E60IC2Z6?= =?us-ascii?Q?g13FJ6ADbJ+Op7Kv6y/rsJQmOnAj5jRBNJqKj1w2R3ykgJ8aEchI7I9mSpdh?= =?us-ascii?Q?pDeuyTq/w8kBP9qQ0JXthti1tHfCtaEM4ynJU/d/koRCduporAiXRjdh1pZ7?= =?us-ascii?Q?hepXA3wBnc363lOLjDRDpBPOVq4c3zpJV/Ha9qN/0lYa257IG0yrmuMw+iU/?= =?us-ascii?Q?yS1MoGf8r8Oj6jTB7sQ27oAvSJ28YmVs/+P1CEjhzlKwD9j5Nf4uAEoRn90n?= =?us-ascii?Q?R12wQiQOh/bjeowf2n1G4hhK/dx829ybtWO9xUGRgfaBUFnkIx2R+OvJZMNa?= =?us-ascii?Q?5q4hql756YUbH15P9ra5WpdhML0HcrO/UitF3XH5FwWNjrGmDBbsjfMHA2OL?= =?us-ascii?Q?X3m6luogfeojn5W/c2PS0ToE1GitmirvNJ2w+R75gLNM4I4u4ts2zAULs3aq?= =?us-ascii?Q?txfeUEPXqgl0/qULLqoaaQi7c83MXFKWT+swrU0UIiF/r6ekQUcRF1TOF/CF?= =?us-ascii?Q?BsgAOeG3xr7dnbMNCp7DkBAULrtFnDSJyQp7M+QqtYoX/VrdJoKwPcFVNaGk?= =?us-ascii?Q?RiptEEEA4OuJnQJrxKwDxpRki+L//ciMWf2hvMOFZVoiJQ7G/cEDh0PIXHJf?= =?us-ascii?Q?FSfYPiAFYbw+A3qxhsIAiotAzVQ9imLkFdTwKcRCrTsZSJAyk1dkaCvAAMHB?= =?us-ascii?Q?ldHgqG+Iy+uIK/WW9sISPmF4O80UVYeFYSV7oU/mD9740tMkJcZ4xWQPWO4Y?= =?us-ascii?Q?+CEdc/F8edSA3LnrR6jJ4MWoi1Yj8vGdjyTLtwhy/bjVb+6an4uravO0Xz5C?= =?us-ascii?Q?5UWJBndNnxEHo5UFh9hNe+8OS/OGYfu5pvGtOXTAQ6SMehy2uvu6HEAj91u3?= =?us-ascii?Q?25p5EuHpGP00PAW96/afxvFxMtyotNAZheKrzy3H1cKve/8Uj59fOu5xoKF7?= =?us-ascii?Q?pHxzx5vhVqFjEW1dj/0CDwJS5yRJWltiaaNhfB2e9KEu7Ui71yG2qSxbRBSC?= =?us-ascii?Q?o8JHeH9Jhdaz1mtyAWybaL7yiB1tsX+ZMI7DR4SNlMqslpfeqO6Vju7JavMU?= =?us-ascii?Q?ORVuGhp1eS1ENCP80fPbGJ/40mxE?= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(1800799024)(376014)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2024 08:53:50.7690 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1be99b92-8acb-42ff-26c8-08dce6ad908a X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN2PEPF00004FC0.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB9064 Content-Type: text/plain; charset="utf-8" Multi link aggregation is not supported for acp6.3 platform. Below combinations are supported. - one sdw BE DAI <---> one-cpu DAI <---> one-codec DAI - one sdw BE DAI <---> one-cpu DAI <---> multi-codec DAIs As Single cpu dai is going to be created, In create_sdw_dailink() function cpu dai index won't be incremented. Refactor cpu dai index logic to fix below smatch static checker warning. sound/soc/amd/acp/acp-sdw-sof-mach.c:157 create_sdw_dailink() warn: iterator 'i' not incremented. Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/a201e871-375e-43eb-960d-5c048956c2ff@am= d.com/T/ Fixes: 6d8348ddc56e ("ASoC: amd: acp: refactor SoundWire machine driver cod= e") Signed-off-by: Vijendar Mukunda --- sound/soc/amd/acp/acp-sdw-sof-mach.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sound/soc/amd/acp/acp-sdw-sof-mach.c b/sound/soc/amd/acp/acp-s= dw-sof-mach.c index acab2675d1f5..3be401c72270 100644 --- a/sound/soc/amd/acp/acp-sdw-sof-mach.c +++ b/sound/soc/amd/acp/acp-sdw-sof-mach.c @@ -154,7 +154,7 @@ static int create_sdw_dailink(struct snd_soc_card *card, int num_cpus =3D hweight32(sof_dai->link_mask[stream]); int num_codecs =3D sof_dai->num_devs[stream]; int playback, capture; - int i =3D 0, j =3D 0; + int j =3D 0; char *name; =20 if (!sof_dai->num_devs[stream]) @@ -213,14 +213,14 @@ static int create_sdw_dailink(struct snd_soc_card *ca= rd, =20 int link_num =3D ffs(sof_end->link_mask) - 1; =20 - cpus[i].dai_name =3D devm_kasprintf(dev, GFP_KERNEL, - "SDW%d Pin%d", - link_num, cpu_pin_id); - dev_dbg(dev, "cpu[%d].dai_name:%s\n", i, cpus[i].dai_name); - if (!cpus[i].dai_name) + cpus->dai_name =3D devm_kasprintf(dev, GFP_KERNEL, + "SDW%d Pin%d", + link_num, cpu_pin_id); + dev_dbg(dev, "cpu->dai_name:%s\n", cpus->dai_name); + if (!cpus->dai_name) return -ENOMEM; =20 - codec_maps[j].cpu =3D i; + codec_maps[j].cpu =3D 0; codec_maps[j].codec =3D j; =20 codecs[j].name =3D sof_end->codec_name; --=20 2.34.1 From nobody Wed Nov 27 23:38:37 2024 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2046.outbound.protection.outlook.com [40.107.223.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5619718C90D; Mon, 7 Oct 2024 08:53:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.223.46 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728291239; cv=fail; b=h0tVUAfj1eNC/znUg19ERLz8UJCEF10p+jc4sY+CJBdtQehvF6Hfg3y4hK67pMGvTZcOd0R+VYmodwwSHJdPfY5iy/vDQY8yUUwYTnkRe06Rg0YwxdOs/3emBBDsMm7qKlS7xXpKy9n04c+T37TCfoaYLMynJiB6LnNn+AZi3Lk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728291239; c=relaxed/simple; bh=mm8/IwTATCAwNz4prSgj7ZjPYJo+T9KM083PDT3mE2Y=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=od3G13nnojG3xIvBOmb3/0qWpE3n0bym6y4LOxbRNPpuCdEy97wrRJI2LWGGLCZepOcCDmntu1nMKYCrSYQmqEefqTOsimbMx2iW5AKWxsVr8HgSBysGuYYH2XgUNq1kmuxvwGo/jiDffXOFLZ23NCAiwE/XW8QCAd5T2oVWoeU= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=Vw6ggAli; arc=fail smtp.client-ip=40.107.223.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="Vw6ggAli" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=eQXL/z9/6mAHRzEmgGyOOKhDd6Y4Y0eEtRpXbSBOpvLOEnUaYp8YCUm1pejTR7U9VbvsP5m5vV34zoqQbs9+Ubfof/X3kP4om/EPDd/XuIrIV/Dhp0qKpt0KiU0RUEt7JOYwF8t9wmuaVCJIEbgHEbxO4v1GIwBH9TdYQUihPhXCXIMNnUHJKZwZgFOhhxdbsIBGuhdORDmbo1xb0cHDF7lnmtiHrP2yPUF7Kd2Ds2PkNT1rSfnqASbqmKUWQGuZgO3otpvT5ZG7SGAYD+3J3NRuF51FBE0BKjheGS5c7pehTv7g42He+u5FkUMTgCVdDfyMvXUw4zMdIhPzwF3BVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JGoU34SRobXPbWo+HmnwiIPTl2+Kdedz6q74T+I7PbQ=; b=ZUrP/tyDrUectb6IVt9t5kDUkcl0eDybxnS9D+UgBIkZjaduRF+RWNJxBz/ucMb06SRqz5p4ucDMENFgkTtkR3uQ5JrdqAIJ72ToVJn/vmqIi6KsB+xmDNAR1Z8D9tWmEL0mV4JBOl+RzNHTE5gq5pDVOBh9oDCxJn6ACSGaVaPKW4BBJkiEMdLVDY0xZbGR3zQg9vw5QIUmPjWrP1IW90hjZ1hLFFFZxFwleeeyF6RrZO/HwqyeNU1uW7wXLwB/5u6jTMD6LqLpBR4VPciqL/pN5HLzSLYajqps8CXJM6wqS8URIpMauSVZDZwLcb+k2YLmaRO1ec1EZoW/kfeQ8w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JGoU34SRobXPbWo+HmnwiIPTl2+Kdedz6q74T+I7PbQ=; b=Vw6ggAliDIKdaQrAWpFiLNQEpOz3g3kDDAyU9z2HZOFKowaXMuE96qY3EL8pQz6ZubS7zFoQYjgIBaJahahBRyFwSIgAWUNTp6fjJXDrLEpVU8yVw0ixGY0/y8fcOhw7o2NfFqPhGxizN4f/CmilNyHKHD3lXdq0OV5D6fmOhCs= Received: from BL1PR13CA0027.namprd13.prod.outlook.com (2603:10b6:208:256::32) by SN7PR12MB8025.namprd12.prod.outlook.com (2603:10b6:806:340::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.22; Mon, 7 Oct 2024 08:53:55 +0000 Received: from BN2PEPF00004FBB.namprd04.prod.outlook.com (2603:10b6:208:256:cafe::64) by BL1PR13CA0027.outlook.office365.com (2603:10b6:208:256::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.16 via Frontend Transport; Mon, 7 Oct 2024 08:53:54 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN2PEPF00004FBB.mail.protection.outlook.com (10.167.243.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8048.13 via Frontend Transport; Mon, 7 Oct 2024 08:53:54 +0000 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 7 Oct 2024 03:53:50 -0500 From: Vijendar Mukunda To: CC: , , , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH 3/3] ASoC: amd: acp: refactor sof_card_dai_links_create() function Date: Mon, 7 Oct 2024 14:23:21 +0530 Message-ID: <20241007085321.3991149-4-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241007085321.3991149-1-Vijendar.Mukunda@amd.com> References: <20241007085321.3991149-1-Vijendar.Mukunda@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF00004FBB:EE_|SN7PR12MB8025:EE_ X-MS-Office365-Filtering-Correlation-Id: ac31f9f0-d22e-4a8e-337e-08dce6ad92f7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?6IBFNeBrMEKVepfgSNsrMv3VDzTEUiYVNOc8mhRekmyajsZpOMCnEwW+85xu?= =?us-ascii?Q?tP1/DyG+RqP1IPMhJNhb5zNUNI+ZowQFgYKimZe4JLGc6DXCNG//u/puR63x?= =?us-ascii?Q?hKjMB2lxXbrrp344Q7Xv5os64k24QISxMwMnZ11znRgYth7riLw069/0dAgt?= =?us-ascii?Q?n2ZHhmKzG35oK0sFpjyAU6AVtkJ0fwl7b3hxjVT7N1dKM6Hx0vnWvqNDac2L?= =?us-ascii?Q?XZJujGgXIAbQ1QWxkJGU2Fu0so+RJodPNUgO117gm23b6I2tALIQZUNkSQvl?= =?us-ascii?Q?1RdsaAiHUxmOEUwV1Rjr77AbF7Ocg9j4carD1w7cILGDab/ehGOUPGf28n9G?= =?us-ascii?Q?5vw1/y2gd7CjjGUVm0dt3KaIACsYkrLClvyYsN3fRwSaxzf36ljbaRAa6zxv?= =?us-ascii?Q?CiqV2UvR6d6aZBguaUQNB/OjU4kLdBgzLbdfSK1s4gXngJCOI6zzVzOFXmPJ?= =?us-ascii?Q?w61IbiB0Jxw3uAW3BqT8lfiO4dFZZpcqAoBIuQEOuGU3BrSGP1hNi8WtrBwK?= =?us-ascii?Q?eqm8peUaxs01ruHGJbIBLbEFwuJi93Vg/E18lfAhpaee82qVMYHckPH6VmiY?= =?us-ascii?Q?6j6r/yRB5TWUS7zqsxOIsxlzZGFFB/poDqNL2P3612QzF0XCKqA0b9xLrUcl?= =?us-ascii?Q?sJTBRAltwCinzBhKq+8f/dwGKJxYd+dBqXJZ1vmEFfrLPMMgkD6Q7jiWkDaA?= =?us-ascii?Q?7xA10VMK6Riyxb2ZZt8T97q8dpCM/6JlGt61D4HN0RLnUx9lOWtIi9JPnx5f?= =?us-ascii?Q?uLI/BgTi5Ejl9uNNPGyS9a9V5JKxtPCILDExy5XV0Hi16VxNBL7E8T5SpAyi?= =?us-ascii?Q?dlZLJzi+U2lfcYS8NQma9ON1baLwD3VC9B5+LpwWBPk771jb88bhK0gxSW4r?= =?us-ascii?Q?+bFJmO1yogBQXCJ8CSjzjxp9GwyJGhwu/Ua1siwZJ+2YVZ+RljF+3EJSjXhD?= =?us-ascii?Q?6Og28u/bOZJ9xGk1WUoAEQWozJYVIR2LOkQHIuHxlVHaj2Fuk+UC4gZuKTRD?= =?us-ascii?Q?ZqstXdVMR7F8d/B2T+sK/nukd1jBZ3MkOwm/Lxf6K3hNnOceuSjaBuAoro5u?= =?us-ascii?Q?gsnrAZmoemWJz0mciiVOoxT4vpHcgyhz4OxyP7imid3TrH3p26CosZ9dgPqw?= =?us-ascii?Q?OvwczgSfQoCgkIhpZxuAYVgPngqcLSx8vlqMo0Fa6BImIxYTaNi2GR10Q0U2?= =?us-ascii?Q?Ezpc79aAoKdGZI3jciqbF6BQuugUjEKuvp42kl3+Feac/TmjFHKcwgoK48MX?= =?us-ascii?Q?bNSZkx416qmHLVlQDmnHZq1IzzvPWV8Hn1mxHEqZCZN7g1RfjA//Fo2JPDXY?= =?us-ascii?Q?fhpfPh+UNiRz2396JdNIojzffyZ+0MQu14nmcvtu1qBitCYEojfcpy45uCVi?= =?us-ascii?Q?geGoX0Ajz0StR7NTIJLht0p8gXx2?= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(1800799024)(376014)(82310400026)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2024 08:53:54.8078 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ac31f9f0-d22e-4a8e-337e-08dce6ad92f7 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN2PEPF00004FBB.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB8025 Content-Type: text/plain; charset="utf-8" Refactor sof_card_dai_links_create() function by replacing 'sof_ends' and 'sof_dais' structure declarations as struct asoc_sdw_endpoint *sof_ends __free(kfree) =3D NULL; struct asoc_sdw_dailink *sof_dais __free(kfree) =3D NULL; Use above declarations to eliminate goto statements usage. Suggested-by: Dan Carpenter Signed-off-by: Vijendar Mukunda --- sound/soc/amd/acp/acp-sdw-sof-mach.c | 33 ++++++++++------------------ 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/sound/soc/amd/acp/acp-sdw-sof-mach.c b/sound/soc/amd/acp/acp-s= dw-sof-mach.c index 3be401c72270..36e6d6db90c1 100644 --- a/sound/soc/amd/acp/acp-sdw-sof-mach.c +++ b/sound/soc/amd/acp/acp-sdw-sof-mach.c @@ -311,9 +311,9 @@ static int sof_card_dai_links_create(struct snd_soc_car= d *card) int sdw_be_num =3D 0, dmic_num =3D 0; struct asoc_sdw_mc_private *ctx =3D snd_soc_card_get_drvdata(card); struct snd_soc_acpi_mach_params *mach_params =3D &mach->mach_params; + struct asoc_sdw_endpoint *sof_ends __free(kfree) =3D NULL; + struct asoc_sdw_dailink *sof_dais __free(kfree) =3D NULL; struct snd_soc_codec_conf *codec_conf; - struct asoc_sdw_endpoint *sof_ends; - struct asoc_sdw_dailink *sof_dais; struct snd_soc_dai_link *dai_links; int num_devs =3D 0; int num_ends =3D 0; @@ -334,14 +334,12 @@ static int sof_card_dai_links_create(struct snd_soc_c= ard *card) =20 /* One per endpoint, ie. each DAI on each codec/amp */ sof_ends =3D kcalloc(num_ends, sizeof(*sof_ends), GFP_KERNEL); - if (!sof_ends) { - ret =3D -ENOMEM; - goto err_dai; - } + if (!sof_ends) + return -ENOMEM; =20 ret =3D asoc_sdw_parse_sdw_endpoints(card, sof_dais, sof_ends, &num_devs); if (ret < 0) - goto err_end; + return ret; =20 sdw_be_num =3D ret; =20 @@ -352,18 +350,14 @@ static int sof_card_dai_links_create(struct snd_soc_c= ard *card) dev_dbg(dev, "sdw %d, dmic %d", sdw_be_num, dmic_num); =20 codec_conf =3D devm_kcalloc(dev, num_devs, sizeof(*codec_conf), GFP_KERNE= L); - if (!codec_conf) { - ret =3D -ENOMEM; - goto err_end; - } + if (!codec_conf) + return -ENOMEM; =20 /* allocate BE dailinks */ num_links =3D sdw_be_num + dmic_num; dai_links =3D devm_kcalloc(dev, num_links, sizeof(*dai_links), GFP_KERNEL= ); - if (!dai_links) { - ret =3D -ENOMEM; - goto err_end; - } + if (!dai_links) + return -ENOMEM; =20 card->codec_conf =3D codec_conf; card->num_configs =3D num_devs; @@ -375,7 +369,7 @@ static int sof_card_dai_links_create(struct snd_soc_car= d *card) ret =3D create_sdw_dailinks(card, &dai_links, &be_id, sof_dais, &codec_conf); if (ret) - goto err_end; + return ret; } =20 /* dmic */ @@ -385,18 +379,13 @@ static int sof_card_dai_links_create(struct snd_soc_c= ard *card) } else { ret =3D create_dmic_dailinks(card, &dai_links, &be_id); if (ret) - goto err_end; + return ret; } } =20 WARN_ON(codec_conf !=3D card->codec_conf + card->num_configs); WARN_ON(dai_links !=3D card->dai_link + card->num_links); =20 -err_end: - kfree(sof_ends); -err_dai: - kfree(sof_dais); - return ret; } =20 --=20 2.34.1