From nobody Sun May 24 20:33:35 2026 Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) (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 66C2A3CBE75; Thu, 21 May 2026 12:25:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=67.231.149.25 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779366325; cv=fail; b=G+3Xa628F0vIqutVtfw0l3XySQIAVeEcNeKkZHY/UFas6B0Q44y21q7k92+rUQUgv32FO0kOqdYQM5cdcA0BDFrTwMpdURLikWubzcJxbYhnGcGP5cKWWcGG+Yel4Ds7/ypwLvk3Lhlpvq0Z8/E3w0fljj0ywuthcdSS7q8eCbE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779366325; c=relaxed/simple; bh=Ew1wMea70Lh92aOOvUFrIY8u9xgh61UBV3qyZ1jtFKk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=CzaeBDIm2SfqM0EZpPzi5dn4JgIKJO6rda9P8unQ008Vc6sKDBeSIS7Ze7FcXJ+TZG0BNmIEB7QDB5cyhumIb6srmSJmhzR7UHq1b9nYqOV/+B5fjSJ5aei7cpx15h1hXoHW2hI+q5IsD9TaccxiOQwdFjXJtiGfCIoDyWBOeqg= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com; spf=pass smtp.mailfrom=opensource.cirrus.com; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b=p/S6uaQP; dkim=pass (1024-bit key) header.d=cirrus4.onmicrosoft.com header.i=@cirrus4.onmicrosoft.com header.b=iVoDoR1y; arc=fail smtp.client-ip=67.231.149.25 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="p/S6uaQP"; dkim=pass (1024-bit key) header.d=cirrus4.onmicrosoft.com header.i=@cirrus4.onmicrosoft.com header.b="iVoDoR1y" Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64L4TG5t2634342; Thu, 21 May 2026 07:25:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= PODMain02222019; bh=9TZ+oEOhZgx1kcke4q4GBv3U2Bz02CPd89jzrkSgrS4=; b= p/S6uaQPWCwmyf5CWwg3oGLRX6GNh42qxpxUy52A8tlzmDxjC4NWDRhPJ5OAHCFq Cohp+3PqdDy5/WUztdOpY1xQdWbdIKlT2iFKkEPpqND28UFXH0GOiZuHuwFhrkpe yBr0KW4URTRUssBpOCaVyY3wIJOL1ARv+dwPq1OANTPGiBC3FPkwRmBn13MRiVmN Imi56ksSO6CeBxyldt6LH2n41eKuaCKPai9wjjvOz/VpdeUEBMMPYI1/2slpbd2Q cuyfoWXRhluc2HdKUcPApj8qJ+8shmQaot4YFMvKT0yL2NOdHsPHjuWBWZdbccqv OfPIC2mtT37Y567zduPcFw== Received: from dm5pr21cu001.outbound.protection.outlook.com (mail-centralusazon11021093.outbound.protection.outlook.com [52.101.62.93]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 4e93xcjerk-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 21 May 2026 07:25:18 -0500 (CDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FxusqbdO93oJGuxXpUMZGFv8+StXJnO7weR/k7tZmvzmEk5vJIp+xTd8yrvOX9j3s/hteON/49VPZ//ywJJDUFIU8Nqf/fms/hpUJ8Z/8vYtd9It1CZmiuXr9CKMOak8dBGqeDNfu7AKKpNcZlqMudestwnX/kIwUb7huIWnvyu422Kz9IwlFHIQTiQDR6DyIzB18SVOHSSPpZqmI+gki4oGBYMaUPU+AKBgWkjkOoRlmVCA1rgKD6LFEeb8X4NvTT32t+X0hchITAIFmBfIkpf1mUzIGX6rV3dgvbV+L4M1QVLgCN4NHt8hwZGa9LDHsa2pSk1Wb8yU3xhlLzd4PQ== 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=9TZ+oEOhZgx1kcke4q4GBv3U2Bz02CPd89jzrkSgrS4=; b=Be7SWTNNDLEkCnxIijCrtRuyQhC6x84vuiTp8dZI0bzbFa6Q781n3Uds/IjDNbPxqVAKsune1PQ0KpKMEqnv0MhScHRFqh9Nqu7edJap3qmo4HphQb5LUl6pC6f5OJ3pl5XvQI6rNAKHXFAcMfeWdFRXVzQ76PFzNtBKa8+GTXZ2uhrCr3j84oGTjjRd9QYvB2KJGe/yvi35D4TVXcXJkStr5loHU9MLl1DK9mRELMXFFkmtYcHrF9OGMZCxwGkxBxhaXC8HPQ2C+9G/QaScRYO8bevRUaolrGoIPavN9RQ65Q5DabUH6P0TSjWEAthjfwlad0G4+Uj0Us+jOVflSA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 84.19.233.75) smtp.rcpttodomain=cirrus.com smtp.mailfrom=opensource.cirrus.com; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=opensource.cirrus.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus4.onmicrosoft.com; s=selector2-cirrus4-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9TZ+oEOhZgx1kcke4q4GBv3U2Bz02CPd89jzrkSgrS4=; b=iVoDoR1yk2myMfo+ws+gy2l7Dt8HyGQmR/1jOIq6FAGQE4v9jWYDR5AXzBuKzFbipzRKET95UHZQ6r5aR3SHRGg3WvapWqwRoIJKpPCUgUxgEVBPB+j2K7TUWxdKXto027zfXfZUof6V+u+1vzyfwoO1LGsheW6oAa8IH/xt5xo= Received: from SJ0PR03CA0152.namprd03.prod.outlook.com (2603:10b6:a03:338::7) by PH7PR19MB5821.namprd19.prod.outlook.com (2603:10b6:510:1d4::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.48.17; Thu, 21 May 2026 12:25:14 +0000 Received: from SJ5PEPF000001F3.namprd05.prod.outlook.com (2603:10b6:a03:338:cafe::11) by SJ0PR03CA0152.outlook.office365.com (2603:10b6:a03:338::7) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.48.16 via Frontend Transport; Thu, 21 May 2026 12:25:14 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 84.19.233.75) smtp.mailfrom=opensource.cirrus.com; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=opensource.cirrus.com; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning opensource.cirrus.com discourages use of 84.19.233.75 as permitted sender) Received: from edirelay1.ad.cirrus.com (84.19.233.75) by SJ5PEPF000001F3.mail.protection.outlook.com (10.167.242.71) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.71.7 via Frontend Transport; Thu, 21 May 2026 12:25:13 +0000 Received: from ediswmail9.ad.cirrus.com (ediswmail9.ad.cirrus.com [198.61.86.93]) by edirelay1.ad.cirrus.com (Postfix) with ESMTPS id 40CC440654A; Thu, 21 May 2026 12:25:12 +0000 (UTC) Received: from ediswws06.ad.cirrus.com (ediswws06.ad.cirrus.com [198.90.208.13]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTPSA id 2A0B482025A; Thu, 21 May 2026 12:25:12 +0000 (UTC) From: Richard Fitzgerald To: broonie@kernel.org Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 1/3] ASoC: cs-amp-lib: Fix wrong sizeof() in _cs_amp_set_efi_calibration_data() Date: Thu, 21 May 2026 13:25:09 +0100 Message-ID: <20260521122511.987322-2-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260521122511.987322-1-rf@opensource.cirrus.com> References: <20260521122511.987322-1-rf@opensource.cirrus.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-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ5PEPF000001F3:EE_|PH7PR19MB5821:EE_ X-MS-Office365-Filtering-Correlation-Id: e39b0794-622b-48fe-b2ec-08deb734025f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700016|376014|82310400026|61400799027|30052699003|11063799006|56012099003|18002099003|22082099003|16102099003; X-Microsoft-Antispam-Message-Info: ufJ4zMJnFLJWk8GfWfkCC6Ql/cwqxeJO5UMYWi+xmSutu0LMy4FJM4uumL649/4BbW8oSXJbhO6qOSogNX3HHCFDpEP+aHtisni/8q2jtOQv7pCDJ3Ug0leAax0DH6eIexuNsuw/2/OQiZtdE5De8RaiIIP2sJR+i+w6m3N8E5+/Rf6joloZtcJCWlxKJToC5idy8xX8Iy6HHlwxXNN+EM/mBK9jaYZSo9H0qyhWdmZgWO8wKgde2uUjVjTz15u8fdR76aoaMl6QTzk/DQ9wh96KQjV74lGAe3V74AzZTxuY0R+FL5EJ0WwAmXwTvc9wndWwFxPfoEmclnXHnTKylKhS9a5WJNM+TVN9NDHalR+p1BUM0tAbOEdg7vf7pcneqwqZTJpNbro6JY5ezo7nO+6pHC64ZtYR1aTYUm9/2HqqbsrmjfDZJKRIgOaDt90zebjHkz5nvbG6T60xuF4qqbLM5x2qQ+oO2/lfzzPv+gdkQg6Et7tu+TwxV8ym0f83A6n6K+yCT+kWtnV3omkSUSwJZHVChcIRl2IuW2avmFG0jvEDcotDqJ8mB4lHHJ6dUD98mA0gIXJmIkmMA1j62RLQtFqoEuaWDX/612+7ajwOlttkRoJLt2xPKughGHNVbMvde1T2PtG/rF/tGwCJZ7yNYjLxRFSBkyMdqV2qbwV0yxs1EXn8p4U49D/wdI4PoHBSZvl9hgS24EuJnEAcKAz3iIeFbZaXV95Y1UjbaLA= X-Forefront-Antispam-Report: CIP:84.19.233.75;CTRY:GB;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:edirelay1.ad.cirrus.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700016)(376014)(82310400026)(61400799027)(30052699003)(11063799006)(56012099003)(18002099003)(22082099003)(16102099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: XE6nRJ0p51+AJ7py9mmsGrPPewDS1ENiunuYilCJWiQsaUrB8ucZsQwL2meB+l8AODMHfjCp30ff71aP569WVqkVpW52qi4X/hc6UfczdDu8DAWEdbVrWja4EKX8Ark7I+31L/9lPUHyzGQRX8xfyrjO9LZa3ytP7qrzs+0CqNiWslwYuinkVFJ6SJ3lG+9URy6nEhkImhppjtnhaH6SxZKstpgcM4tSMFm8OJi91GYp6wBalX4UiaEMFjdkflj876+6C7JlYyz/bZ2SYCDCgZ08GdIwjUtwDWI+2vnM3vNCQYmyF8J5n1ji5+mPVY+Hoy4N35hYIc66XBUG5aLN+VdGxZRoMVxejnzpAKh/6kp4QOqZ8VAjLY0bl6x633idWT1V4/omDHLoYH5djspxeQnps/dYbVHwOz5fEpxj170WOwLHuY+6WG2FZWeIhOko X-Exchange-RoutingPolicyChecked: su/osYvW0BcXrnx7dAvxqM+H7PJ6w4E117I03L7Q1uuE8Ex0HJ4YacLjf+oECCnmJNJZe2eE2G7pzv8GNSk5luDpZTKQ6uSnH4y/kj/5IoReXjlgkfZK/90E4+GubcFlU8o1ezowV+YwdrzzVPw/+WWt61YkgG0HslcOgCxoLB7actHXqhencwq5eTVdDh4vmanClfZafVHn1YprbiWpwmFXFtBr7DnZdQ+4RD8+aK9c+Zl3t0OaGk02C3+EO/cXLoPti9sPvRho7fhUlYtKgcadyWbPnyUXciI6thK++23cHxDqUR+fJowdRfufreoOC2TzUyf+5Q5RlrazolvVOg== X-OriginatorOrg: opensource.cirrus.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 May 2026 12:25:13.5849 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e39b0794-622b-48fe-b2ec-08deb734025f X-MS-Exchange-CrossTenant-Id: bec09025-e5bc-40d1-a355-8e955c307de8 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bec09025-e5bc-40d1-a355-8e955c307de8;Ip=[84.19.233.75];Helo=[edirelay1.ad.cirrus.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-SJ5PEPF000001F3.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR19MB5821 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTIxMDEyNCBTYWx0ZWRfX7otzwBpEX2im KfHvox160fzpLvB+vncw7vHLkszme+q+J5ackRELXKWiUnRpPBZCJ8kczwu2yP6zmUOxdo/1VhB sVJE182MuUXMDxVRYJ7stTKJ6LMkWfXzr98a+jQ5kFMBmdcCdlx4AtJl2mNKt46eZLzuGT4WJZz 8uRM5Yo/y/GxCb1bnsTSAriJ9Jx3C7t2/jaZ048Tx5yXpb9zeYfAMZBPqhw8yRX9bpQomMB35A/ PnDUksgeXFrcCjpyExobiJ0SVRaGIz6H89UlxnYLW+7MNRrjDEPNM2Mt5YJTon+h2cHPqUURHWE t15xAonddkF1Ujj55o09ZGGFHIA8LGLOuWEvi02ER/8HdV6MK/nShVDN2igktazjdqEPq5J5qPH r/YTn9p8T9Jp2QPhTtk/9QyIAP8CRBoCPZNun33+J8PTPvs8WLNAsCRNStyDknIzohqIqG5JXeM 315I9ZgvtXUvxQobsRw== X-Proofpoint-GUID: 7ZN1H8C_6cJE5xjn6-twyW7XE28Dclj1 X-Authority-Analysis: v=2.4 cv=Wrgb99fv c=1 sm=1 tr=0 ts=6a0ef9af cx=c_pps a=y4zkFa5omBjxxVHSBTJAWA==:117 a=h1hSm8JtM9GN1ddwPAif2w==:17 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=z/mQ4Ysz8XfWz/Q5cLBRGdckG28=:19 a=NGcC8JguVDcA:10 a=s63m1ICgrNkA:10 a=RWc_ulEos4gA:10 a=VkNPw1HP01LnGYTKEx00:22 a=iX4cTi3TZMoOKdANLEfx:22 a=Dj2-6B8FqX4mGL0U3gbX:22 a=w1d2syhTAAAA:8 a=TS7Ed_d5VwyFwgGqxuQA:9 X-Proofpoint-ORIG-GUID: 7ZN1H8C_6cJE5xjn6-twyW7XE28Dclj1 X-Proofpoint-Spam-Reason: safe Content-Type: text/plain; charset="utf-8" When calculating data->count replace the incorrect sizeof(data) with use of struct_offset(). The faulty sizeof(data) was incorrectly calculating the size of the pointer instead of the size of the struct pointed to. As it happens, both values are 8 on a 64-bit CPU. In the unlikely event of using this code on a 32-bit CPU the number of available bytes would be calculated 4 larger than is actually available. Instead of changing to sizeof(*data) it has been replaced by struct_offset() because it has better chance of detecting these sorts of typos. Also the offset of the data[] array is actually what we want to know here anyway. Signed-off-by: Richard Fitzgerald Fixes: 2b62e66626f0 ("ASoC: cs-amp-lib: Add function to write calibration t= o UEFI") --- sound/soc/codecs/cs-amp-lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/cs-amp-lib.c b/sound/soc/codecs/cs-amp-lib.c index b34b1f5f121f..881c6f2264f3 100644 --- a/sound/soc/codecs/cs-amp-lib.c +++ b/sound/soc/codecs/cs-amp-lib.c @@ -500,7 +500,7 @@ static int _cs_amp_set_efi_calibration_data(struct devi= ce *dev, int amp_index, i * must be set. */ if (data->count =3D=3D 0) - data->count =3D (data->size - sizeof(data)) / sizeof(data->data[0]); + data->count =3D (data->size - struct_offset(data, data)) / sizeof(data->= data[0]); =20 if (amp_index < 0) { /* Is there already a slot for this target? */ --=20 2.47.3 From nobody Sun May 24 20:33:35 2026 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (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 C8EEA3B5F48; Thu, 21 May 2026 12:25:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=67.231.152.168 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779366326; cv=fail; b=Cg8Y2M61xuaphr7jD0Lp8GTvUu90TWy9MFUUXW5SaIix2XUq4cnLP52nbg6+mpsxONujp/w5/LOIA6upfz2Ko6xWABLeMjGTTPCWR5fcfAlthI4YrBi/SqYLBAkNdUxHhkXNFcJx50J6aiin0LF37XR7JGfGK/olJmOZbzPFVT0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779366326; c=relaxed/simple; bh=L5vLK9OyRvBBwbsgzu9f/HiGZV3djIk+zD+tLxJxt+c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=swymgTOsvSuG801aEa8EAfKPBpgQjMmdR4zrOh7vZa3aIZvW/zLxKYq8xOOPSiHsdmdAlcGMt+C3PoRF9eNJGfwqjhJ3MmYgDU3/UkxDeL3Rqj1MUDqUZJOxqldR6ZgNsfw+CyZwfgqFawDpAhvYCJBNSzHif0u7GEbNquxCIEk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com; spf=pass smtp.mailfrom=opensource.cirrus.com; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b=eaAQ1cDP; dkim=pass (1024-bit key) header.d=cirrus4.onmicrosoft.com header.i=@cirrus4.onmicrosoft.com header.b=N5EqRoGN; arc=fail smtp.client-ip=67.231.152.168 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="eaAQ1cDP"; dkim=pass (1024-bit key) header.d=cirrus4.onmicrosoft.com header.i=@cirrus4.onmicrosoft.com header.b="N5EqRoGN" Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64L5j7Qm2907624; Thu, 21 May 2026 07:25:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= PODMain02222019; bh=84GlTw9xr1Z81MgBXDf+UMtk9TEu2VX//+1L0MlWuLI=; b= eaAQ1cDPGnKjoLUEM4UtNkyF8GEatS95Kj5JQbjdo54Q/fNvqJ9yZycT0YYL2WF3 IBuNTpXzNBhplkHEXSwbjNNchrhEjE6arkIHFa1fjOphlSv8O8bZ+uusqEUtygiU STio2vB9S3abdlPQffWaZ7GtZfqjdyfQgw6g2XGBfCe1DhMAad8rE5n74+o7MV2Y HBn7aipneceNy8oaz0zN2uoZRVIClQHshu51jRd+ZNHcx+U03zEe1lX3gCKsBXlZ t70FC91v6znZ/yKWvedEfZTV6fNcitZ5Mm3D23wh5fKpLKoERMLOQSJrrtqMecPn 0MO+Rvb4g61XrIDFvLh8oA== Received: from sj2pr03cu001.outbound.protection.outlook.com (mail-westusazon11022110.outbound.protection.outlook.com [52.101.43.110]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 4e93g1jbpv-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 21 May 2026 07:25:19 -0500 (CDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SJCklt+8ub01q3am1JHM94WqG3SEagtqjK1RhcacocWCKsqTDK7am0mg1OvuOzx9YssWTf6UtqrL6h5L1Cd5fBY/3xFFUS7GGvTiIbYMxAXBUVEjNfZzp86K9OyDZggKuNG/vjMLcJxfKq3uvM1Ks2DLoRFPyH0SSa5hbhNRSR4cBFuBaCtN9iutT18Xv5pXlYfsa7xyf3886h/ny/icDOS2rcxHJHCzlqQ01JvNy3pPYlIUpsg1wV0O0ZDIN4XmE3HiEdYL46P2NYK6oEbVpGWRqC3lG4lBF3ZFrBMKQuIqS78POf5RYSuGTolPCGg6tiNug6KbNTFCnWVz6ykgNQ== 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=84GlTw9xr1Z81MgBXDf+UMtk9TEu2VX//+1L0MlWuLI=; b=EKPEkvUNqGSu5pKux2b+46/dhmnYZccd/eQMtx8UE2rHeyZZLiyLP1Z4tbmd/bnPBHbq7WZXKsmym1P6RWJByv0GOVs9v10Mp9Yq+EfcoigCBSxEOy/7LBQkcTBRk0hEB2gE6VvEGPn6YpSvhJJ4ZwXPxbKpk+vhyCQbcBGzs9UCJBhHwSk+zi1A6Itguq3MbnZmPxM2YJSxO1kBhc7dXcTCh1E59snv4vSVuySdRAW4X3sLlQ2usFkRtUhBU/WR9haNQGvj9Gzda1MSUqCEdDx+OSq08RKA+De4nscE7S4NziSt0puPdrCf7QmCrgQSx1KsmRHs16izq6UvWm8Y0Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 84.19.233.75) smtp.rcpttodomain=cirrus.com smtp.mailfrom=opensource.cirrus.com; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=opensource.cirrus.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus4.onmicrosoft.com; s=selector2-cirrus4-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=84GlTw9xr1Z81MgBXDf+UMtk9TEu2VX//+1L0MlWuLI=; b=N5EqRoGN1XaJjS+rCYqetHisJmehx2ZV/O3keQgkw1381QnAlGBmPS/tkNuu5+tkKPq2HedobR4jd22HBrr2s76+T6NkKgePdHK5oOqUS95NI3Fj010Dw2DRYKew1t2Rsbfda2xYeTyNRnBon4rugBtklkVh1hSthvYylaz5OlQ= Received: from BY5PR03CA0002.namprd03.prod.outlook.com (2603:10b6:a03:1e0::12) by SJ0PR19MB5480.namprd19.prod.outlook.com (2603:10b6:a03:3d8::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.48.14; Thu, 21 May 2026 12:25:14 +0000 Received: from SJ5PEPF000001F1.namprd05.prod.outlook.com (2603:10b6:a03:1e0:cafe::5c) by BY5PR03CA0002.outlook.office365.com (2603:10b6:a03:1e0::12) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.48.16 via Frontend Transport; Thu, 21 May 2026 12:25:14 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 84.19.233.75) smtp.mailfrom=opensource.cirrus.com; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=opensource.cirrus.com; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning opensource.cirrus.com discourages use of 84.19.233.75 as permitted sender) Received: from edirelay1.ad.cirrus.com (84.19.233.75) by SJ5PEPF000001F1.mail.protection.outlook.com (10.167.242.69) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.71.7 via Frontend Transport; Thu, 21 May 2026 12:25:14 +0000 Received: from ediswmail9.ad.cirrus.com (ediswmail9.ad.cirrus.com [198.61.86.93]) by edirelay1.ad.cirrus.com (Postfix) with ESMTPS id 40C84406544; Thu, 21 May 2026 12:25:12 +0000 (UTC) Received: from ediswws06.ad.cirrus.com (ediswws06.ad.cirrus.com [198.90.208.13]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTPSA id 2CBE582026C; Thu, 21 May 2026 12:25:12 +0000 (UTC) From: Richard Fitzgerald To: broonie@kernel.org Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 2/3] ASoC: cs-amp-lib: Fix missing dput() after debugfs_lookup() Date: Thu, 21 May 2026 13:25:10 +0100 Message-ID: <20260521122511.987322-3-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260521122511.987322-1-rf@opensource.cirrus.com> References: <20260521122511.987322-1-rf@opensource.cirrus.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-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ5PEPF000001F1:EE_|SJ0PR19MB5480:EE_ X-MS-Office365-Filtering-Correlation-Id: 50a7a1ff-8e46-4175-9a2c-08deb73402ab X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|61400799027|82310400026|36860700016|376014|11063799006|18002099003|16102099003|22082099003|56012099003; X-Microsoft-Antispam-Message-Info: JDTOpHtDJQJ9PJXNZOdkLxFIahOaPrc4O1LF0MmuRURxT+C7WDn+lE1ArgD4YR/dO2j2MNfOpH9ITiRv0/TfTg+/XIEaeY04DP4dzMMhioPzkMMfP2p2ReJw29m35WiOAHpg8Z67omaE9oz1dhIm1WpzQcKJtj9ukKe1PjKFCTsSQlVam9Eq2RrgG5gqRwUTYM8Z2ulkSekWrxQ205+gfWKZQydK+4821z5JcrMeXhhGcSuMMIdwjP72mtFfF4oczLRoAlF6HtmH2qII7Eu3F8cRatyAtcw7Mgh9D2bTfCkDbKyGxjYIad+qhIpM59qE856GjY7tdCiQ/Iuuwo4Xtcrzb9tpQAubVlKl2afaY3b181XqJqECIoQiugHWFZt7lA8CRFPGu3+0djSsNPKo3b4yk+/gCCpNeCSTyaMQlsAWRfYwKGiu3F4+AGbVNLeSALDPvblYJzBVfIDYkXZQiSPLXMLGzvYuH5YCM3St/DxSTE+BtWvkk2KB9ByTASSE6eJHsyYV+Td4amIYilOxu+tomZcD8teex5YYjle4nccGwfns+kTEF4y6kuqiSVcFvNcQkHdULQefO53vcLZBf4M05+NE8xwGF2xHb+YqJki1HH3LHCkAUj04I8VJHSym5G4fFqI26f7R0lHGW4B6xTIeMi88ufHfAQcS18yuz7P8nhUex1c7IuCRlYiq/30FVEqM7pvQUwQFijgb4Xaj1ZkOwojYWZjHDBrRtQC0cAA= X-Forefront-Antispam-Report: CIP:84.19.233.75;CTRY:GB;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:edirelay1.ad.cirrus.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(61400799027)(82310400026)(36860700016)(376014)(11063799006)(18002099003)(16102099003)(22082099003)(56012099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ZonywTtUYlgYyjffUpmMUz+2SjLrMxFR0kuE567nW1r9FPrWbXEVWWEZ4DszYM15H8+JT7ib8w9QqsmYbvjKbqbuG9WLLqu/XOSZuqcn53F8hGWgiDUWJY4/sHXEXI9UZG08CKy/goPkKxfOkgr87hdAMvsQL8jCRuZFGcNv55Q9tQcSKu1dp3/QExoNGUl+hNCOyRhLCtTRy6jx7XwXJvn7XIdLy7Xmdnw1CUfSjiAqG5g4OkJmy2rMTL2bnOwc/9hGvP2kd2A/G4I39tMVbKmiiFlGi+wOU3lPk9neyzPYAEtMLgtciy3v6t2JCFHaE2E7a/LhUcalvE9yfrwT7+xd6nNQKem9wm8WSxyxOJJkMDcROdiKdZSDIbEmkMQztjY4fIqd+a5Em/OH3iJyTgWZvIOcTN7p5LDpIKtjsf/QPzSkXKofWh6cNCo674aW X-Exchange-RoutingPolicyChecked: NtfNNdINCmQNpgAlwPKjarIjdjNNzLwt4CCpgUA4O8I29KeoI/vfvxvD7osTrZm60g/zMZUfe4wHmehs8e4i/7dV2IXysvJUyzyjCnJrgBMKeRSy99nDlwVkNLFBCeo2dni9hFxPLpktC1lmipMjYY8FOI9eEwwTgbXWSlcPpoPAj29y62zRiUkXnryyXue1SN6236x1HoOugLHAyywfs/50IkQFYYsndRdYIpOHep0hes6b0SfJYiRAFhCbWaQAL/56/2Cad9PqG7noCrnKesvNAVP+dDfrMKrDDOfV25syVwjK4eGmdvejzc2sTMLMMyFVbCunU1Nw/LfWkz1Rcw== X-OriginatorOrg: opensource.cirrus.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 May 2026 12:25:14.0827 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 50a7a1ff-8e46-4175-9a2c-08deb73402ab X-MS-Exchange-CrossTenant-Id: bec09025-e5bc-40d1-a355-8e955c307de8 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bec09025-e5bc-40d1-a355-8e955c307de8;Ip=[84.19.233.75];Helo=[edirelay1.ad.cirrus.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-SJ5PEPF000001F1.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR19MB5480 X-Proofpoint-ORIG-GUID: yf6AOARlucfHrqww0TSeVTM1f-z1z-ke X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTIxMDEyNCBTYWx0ZWRfX1r+6FOaQKi3P JKF8rIJYFnGz/HI7j8VGW87BnzEBJflnDaiMotpTOfTYLHyHm5GMRwG5PwODURZXh217sMLlzV+ 16fmtfJkg8CkkGE6sXgKEPnIivTixYMiaw5pSeg7Dv2uioxFp93cBzdIgvBxxOKT0wZ3N0ostWU ebIK6lSWG6cw1rsvA6MhNrNmi8K86/eyCqMGNXUmqtupr2BzHKezRs7kfGHupQ8sHQVqJSSMf1O Vdi/FmuIGyUCrWZILWpDPFAJJiFc3331VKhOKwWy5SrtCVXCuSDED49G9xws85h9TBIEV0Dbxtk ShpshPxs2rg4JtyZXJ2mdL/aQWeEWe/S8xwNJhaDauHsg20em7jOwp3gHtRAwTRqbRVMGGYFWld LyTxo7MSyNPVWVat22UPPw57EJ1BNCzanGLPhX8qsg1hcr0FBm5q8dJxFo5bXEDvDEywnwPORHB bDKENN+K7aejnVz4y1Q== X-Authority-Analysis: v=2.4 cv=Wrcb99fv c=1 sm=1 tr=0 ts=6a0ef9af cx=c_pps a=R5lJJwLUw69E8voCr07FQA==:117 a=h1hSm8JtM9GN1ddwPAif2w==:17 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=z/mQ4Ysz8XfWz/Q5cLBRGdckG28=:19 a=NGcC8JguVDcA:10 a=s63m1ICgrNkA:10 a=RWc_ulEos4gA:10 a=VkNPw1HP01LnGYTKEx00:22 a=iX4cTi3TZMoOKdANLEfx:22 a=KfkQE9S9VqCBgivYGm0O:22 a=w1d2syhTAAAA:8 a=649nZLQrhVN-gLmPknIA:9 X-Proofpoint-GUID: yf6AOARlucfHrqww0TSeVTM1f-z1z-ke X-Proofpoint-Spam-Reason: safe Content-Type: text/plain; charset="utf-8" Rewrite cs_amp_create_debugfs() so that dput() will be called on a valid dentry returned from debugfs_lookup(). The pointer returned from debugfs_lookup() must be released by dput(). The pointer returned from debugfs_create_dir() does not need to be passed to dput(). Signed-off-by: Richard Fitzgerald Fixes: cdd27fa3298a ("ASoC: cs-amp-lib: Add helpers for factory calibration= ") --- sound/soc/codecs/cs-amp-lib.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/cs-amp-lib.c b/sound/soc/codecs/cs-amp-lib.c index 881c6f2264f3..e97a125ebbb3 100644 --- a/sound/soc/codecs/cs-amp-lib.c +++ b/sound/soc/codecs/cs-amp-lib.c @@ -833,11 +833,18 @@ EXPORT_SYMBOL_NS_GPL(cs_amp_devm_get_vendor_specific_= variant_id, "SND_SOC_CS_AMP */ struct dentry *cs_amp_create_debugfs(struct device *dev) { - struct dentry *dir; + struct dentry *dir, *created; =20 + /* debugfs_lookup() can return NULL or ERR_PTR on error */ dir =3D debugfs_lookup("cirrus_logic", NULL); - if (!dir) - dir =3D debugfs_create_dir("cirrus_logic", NULL); + if (!IS_ERR_OR_NULL(dir)) { + created =3D debugfs_create_dir(dev_name(dev), dir); + dput(dir); + + return created; + } + + dir =3D debugfs_create_dir("cirrus_logic", NULL); =20 return debugfs_create_dir(dev_name(dev), dir); } --=20 2.47.3 From nobody Sun May 24 20:33:35 2026 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (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 161413D0C16; Thu, 21 May 2026 12:25:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=67.231.152.168 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779366324; cv=fail; b=mxJt8Gxtcf5Nh04fIgHobSvMLOFThNbSWrHDbgX+s1HzQh7nvsNiV3fpHWTNjKIsNCX9cpSkUfObkQoNXQtnjU9VLwUisyT8ZRiFp9/4H2hXDT6F97LOgDX2xUYogobFLiD1P2S/b7oJ6fdj+KuNI3llH438fdu/nSdEeJhG6jA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779366324; c=relaxed/simple; bh=PqPrqFR46mubKR4aqOaT6rkZc95lCR1Bu7nuYgq+u0s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=am4z03vk1MU1drTYaiRhOEslBPe2DA0lMPdbGAZE7xIiepJvh/Q9hfUXYAJowBPz6xNLfiQ/La3cr1BHt1wzUnBNhc5Sci4fOk2KRKkBZm2jpn0LmGPE/Vo+SFzej0WAgwNWZkEDeTTD3fHSlHfBU7EmhzpQvJNF3w3MK+99lxQ= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com; spf=pass smtp.mailfrom=opensource.cirrus.com; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b=QlfmkgSe; dkim=pass (1024-bit key) header.d=cirrus4.onmicrosoft.com header.i=@cirrus4.onmicrosoft.com header.b=FjONs2D2; arc=fail smtp.client-ip=67.231.152.168 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="QlfmkgSe"; dkim=pass (1024-bit key) header.d=cirrus4.onmicrosoft.com header.i=@cirrus4.onmicrosoft.com header.b="FjONs2D2" Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64L5BlPb2850731; Thu, 21 May 2026 07:25:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= PODMain02222019; bh=4ZtlUJIqT93zKpCFSJTSHGQ6F8Ae+ej8hDswv4ztvbU=; b= QlfmkgSeIikjb3089Jzz8FbekM2ndVAxIKQMzm/l6nXH/o3NxcDbd4CrJ4cwCWJr bCvWkwFa8Oj9Z8R9GxBoOfFR4Ci2/hgmHGti2dVxkgkBEuvELV7VpZII5Lp/Jqvl e+PhH8qL8GxPJn+JlF3K83TpWfF56yhTHQxd3Ahtc7XSYFlb2w1imp6mE5Y7N57X rBTNFGwg76mAb00I4ka5D/Txgetx+ZXUcTYFWH3gAOb2OCZghUJT8/4mYpBSSjxa xFI7YKmU+V+qiyZijvTB9gtxaPmQnKE+mj/MlDJzlnltP86KgkrbLSOWzvj5yaAX cFHxSyZHos0NOZLLfdZbVg== Received: from bl0pr03cu003.outbound.protection.outlook.com (mail-eastusazon11022139.outbound.protection.outlook.com [52.101.53.139]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 4e93g1jbpt-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 21 May 2026 07:25:18 -0500 (CDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=iOlz+s9qFHpa/WT2BAJE3OfZ14jRv3+OOq7Zw1xuN/DcfLfNqtupiuaJgV50thjqqXyuI0A6d8AV4dFyXFgYGTWpsSINxoJdG68EaVjnhY+GEqx5HlDt44b9nUA4cwbmVBdcIFD+YB1G6QRDALo0XIgIsp4jdPj3T91sixb1pKl1iJOGblWp84KhNRII5AC4V3x/y1jrZSgzRH5pG5tv+vOHz24UrGW65+VqYXcauQJh1lUmqRToCRcMPVC1CFmOgI9OsRrJQaAnmiJ09HWxoXJqTJcdB6fGf0PjHr+r9joa5C2dBB0qLQbNkj00/pobf1vKssjgi1M66OJwrS3trg== 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=4ZtlUJIqT93zKpCFSJTSHGQ6F8Ae+ej8hDswv4ztvbU=; b=aMtzPAuuzXAM2IHqzWrDI5ip4p3tVvyvpEnUWIowo0kHxAb5igLTIcQV7+IkNpMlKT49XAV/5Tqf+tZTWbvi4h2GGi29UM+TMeC+wY/n2xS1JnxS3TSWPY8EvLwGSCEKYjMh+3If1uQtQUjBFvZM+yTyl49GfMXFLkh8ifXJf2aEte3S8OniY5PiJ5tCW+9zmmGa6GfSXd8p0uP7TaNl9zU0Z4bBU9jzLIOWObeU6+dM0G5kWqIUDsyNxmiqiCuRZhdYOkvJxCK3zX/3Tahpwhtx9MyaX0PstXLrY0Oy5wm1lLMBJmqMD8HKovtua3ph/EumIkkdlsKkPRBKemhSfA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 84.19.233.75) smtp.rcpttodomain=cirrus.com smtp.mailfrom=opensource.cirrus.com; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=opensource.cirrus.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus4.onmicrosoft.com; s=selector2-cirrus4-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4ZtlUJIqT93zKpCFSJTSHGQ6F8Ae+ej8hDswv4ztvbU=; b=FjONs2D2Ur4+josxY3J2/u99AbY9EP0elpsf+hyF7UJKFq79qzIE/thaddAoP07ACaacybPfnjuZKIceo/v6N61GOWG2QhzrYK5gS163iZyvDHvYpoKCfTu90Dtmef6MI8KbHRC+AWF4TOD7ZK3L/B6suDXDSPO1AX1LnSgwy9A= Received: from BL1P221CA0039.NAMP221.PROD.OUTLOOK.COM (2603:10b6:208:5b5::17) by EAYPR19MB997318.namprd19.prod.outlook.com (2603:10b6:303:2c0::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.48.17; Thu, 21 May 2026 12:25:14 +0000 Received: from BN2PEPF000055DD.namprd21.prod.outlook.com (2603:10b6:208:5b5:cafe::2a) by BL1P221CA0039.outlook.office365.com (2603:10b6:208:5b5::17) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.48.17 via Frontend Transport; Thu, 21 May 2026 12:25:14 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 84.19.233.75) smtp.mailfrom=opensource.cirrus.com; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=opensource.cirrus.com; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning opensource.cirrus.com discourages use of 84.19.233.75 as permitted sender) Received: from edirelay1.ad.cirrus.com (84.19.233.75) by BN2PEPF000055DD.mail.protection.outlook.com (10.167.245.7) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.71.0 via Frontend Transport; Thu, 21 May 2026 12:25:13 +0000 Received: from ediswmail9.ad.cirrus.com (ediswmail9.ad.cirrus.com [198.61.86.93]) by edirelay1.ad.cirrus.com (Postfix) with ESMTPS id 4A1DF406550; Thu, 21 May 2026 12:25:12 +0000 (UTC) Received: from ediswws06.ad.cirrus.com (ediswws06.ad.cirrus.com [198.90.208.13]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTPSA id 3925B820244; Thu, 21 May 2026 12:25:12 +0000 (UTC) From: Richard Fitzgerald To: broonie@kernel.org Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 3/3] ASoC: cs-amp-lib: Fix typo in error message: write -> read Date: Thu, 21 May 2026 13:25:11 +0100 Message-ID: <20260521122511.987322-4-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260521122511.987322-1-rf@opensource.cirrus.com> References: <20260521122511.987322-1-rf@opensource.cirrus.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-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000055DD:EE_|EAYPR19MB997318:EE_ X-MS-Office365-Filtering-Correlation-Id: 55543c4e-97e3-4696-ef1a-08deb7340253 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700016|61400799027|376014|82310400026|18002099003|16102099003|22082099003|56012099003|11063799006; X-Microsoft-Antispam-Message-Info: 9b1wRIFPiNMoeC2fAN6C98Ys2tHQBKIPa4GUm7IQGp0pLzgBUC3Xbsk1nI4uuzUd2RPnjgH1um6U+V8X34mTF0VOOQM7gwmRTFUIbziLXO5J/0XOEwJLaOvE95EJEP8qQsbfVqJ/dxjQWIxb+fUYJwBrBKJTVexDxypWa7nBlEg1UfAgpdqjTqb7GGmfMDbBs4xrzGRLqBjtibIutKeaEhqMRsNNLw4DJLR0TUTVTsvmWYHJADzcJYos4TH02bMzUXndngfTPVLECmT/3Tr+3IkBtQGu+Tk4/y9zcUsCGwV3c6+tfEr08vGcKXIf3h9yv2nm03s455hWmTOZ0PYmIal+rINWtBAiBdm0up2tMduvgWsLjEe27gnAkQoKwln7rhml1+uh4mRq0RTP5Yt1N8U4eyvl8fuoHz0wWaKUV3cHi8ZyvqPpOrOTXODfxd6EWxDZMi9Bp0/Q5tSNIFvubt3tSqYR+FN7sQruBjJhNxMtqGTg1FgSOO55iOc8G/QJWnORZshaKcEV1toTXR9VIkF+mUsL4i9LcBVzufe4SrK77K93CejCaaJZP/XAn9jCrBlKXS7gw6mD3geBmtZGUKhgqgJhFx8Cv50HJx/AaI4Om/wSD7zEiKihhJsjldVDhK2ZZO36SogNr7fbW02VkAuh3EGUIkxLb/xhUc3TERDmYR7MLWChm8F6neBfdTdYI58P17/kFsDSvOA1V8lYxviNufNzKNSUeRxT/Ti2cvc= X-Forefront-Antispam-Report: CIP:84.19.233.75;CTRY:GB;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:edirelay1.ad.cirrus.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700016)(61400799027)(376014)(82310400026)(18002099003)(16102099003)(22082099003)(56012099003)(11063799006);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: xZS7lxwLVxDxOus+zI3Z+enNxTg48PP4JZ4TlXJkOYpreOmgE0b3iGnwzsl/Z8GWyKFyXyWuGfoeZtVDRy3eox0hPoIU6R22gSCIJYcIHmoVeOif48IXsnTmZtl6zznh3FAHNn9JowEnCR/ibhNGgIZy5kc4vZSs9EGKrgHHO0hkiNRvayfYmlH2emR0aY8T1G357T6JOzhc1bTHiYC6c7o+Ca3GfKj0ed+a0oJRZxcDHZfF77NuS8Sgx5CvL7H41VWNqlPxTQZle3Fo8bq+E/l0C913Qv7nsLyGZTibuL5LLbk3J0U2Vc7DFNDZD2mjvaGywxjDbkTXK9I9gI6wT9xayUoP7Q/h4LsroJdA9zg31/QV8HHUgmRqeDFaVXLE/liIxUcuvkrItdU+EoZ0d//W1I7WIWpQIB2VdyBu3+TePsM12DHPbYd9uO+HaLKC X-Exchange-RoutingPolicyChecked: aB2ikTP+M6lkiIa9P1Vgns7+XUgqf7146URSfmCvhSgMTaKXiQrTMHnTO2uChSafMLnbghCMq9xHcjcY5a9G1rZ/5MFjFtpwrCmF2KWaOb23rd/nmqIuoMzXkzizM7YV4vMQuPqsGoK8UvRfX3xEJJba07F6ggBTZVrRp/ExTf3AysbedsByWEMaY0idCZjQNVvw9RCRWg6J3FZN2W/++26K3lT9HRc5H2sPrnW5G5WK+RDShrpzrx4Oc/ASdMO+CAwcejzKPp2p4HLGcloMrZY7IkiWnJzj2IaD+qvSn8vMWS9NlZh9G00essocf5oRFDpFTGHQ126lKJV64fctPg== X-OriginatorOrg: opensource.cirrus.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 May 2026 12:25:13.6307 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 55543c4e-97e3-4696-ef1a-08deb7340253 X-MS-Exchange-CrossTenant-Id: bec09025-e5bc-40d1-a355-8e955c307de8 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bec09025-e5bc-40d1-a355-8e955c307de8;Ip=[84.19.233.75];Helo=[edirelay1.ad.cirrus.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-BN2PEPF000055DD.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: EAYPR19MB997318 X-Proofpoint-ORIG-GUID: ZRMLG17BHFpzYE08h0vapEeAoMuRFMKJ X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTIxMDEyNCBTYWx0ZWRfXzIOlvc+whBQ8 sztXJNOwfp+bdtkfiWI6rNIotYu3HOREDLOS/VfMMxB3YQOD1kN2UKbQIs5YWnEfkW01FwWMNsp BPLo3H9EsX9s/BAtsZzCd/S172oCzzSO5A2TO/A/SQ2Iema3fP/bX6d8K2rFOzv4PVk0sPY7Yjl Y5VIi1n0FQY4OW/RDhSRUqZCBuJaMe8unGiQOGNjYgM/kg5pyU92U3WgjcotaeyE3jCpGrIAEd8 lXQv5Iw5ET2l9+zJ1hMuSz4tDENvQzfWjsCBAGXff9NWlnea5GWRfZyav6hpmPRqKf04c9dMNEO icfSgTjoZ2bLZ9d/4OiW0DSLwKXgxzOd5wjNDjNj6Klh1vxc7SrQaH69dvpJXIX6jnNjACfJjqZ Jk9NzZjw6dscZSWwWBGtDFQmHWv0aZBgIsZJCFA2POjA+SZYo0s/beRtTOsYqm8z1H97qmGPQ29 17Hm+0hQXPy0jUv+aqg== X-Authority-Analysis: v=2.4 cv=Wrcb99fv c=1 sm=1 tr=0 ts=6a0ef9ae cx=c_pps a=cbpO+9MDPorBMVlaIuc8EQ==:117 a=h1hSm8JtM9GN1ddwPAif2w==:17 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=z/mQ4Ysz8XfWz/Q5cLBRGdckG28=:19 a=NGcC8JguVDcA:10 a=s63m1ICgrNkA:10 a=RWc_ulEos4gA:10 a=VkNPw1HP01LnGYTKEx00:22 a=iX4cTi3TZMoOKdANLEfx:22 a=KfkQE9S9VqCBgivYGm0O:22 a=w1d2syhTAAAA:8 a=K0wYxiOKNpv-6Jp2P78A:9 X-Proofpoint-GUID: ZRMLG17BHFpzYE08h0vapEeAoMuRFMKJ X-Proofpoint-Spam-Reason: safe Content-Type: text/plain; charset="utf-8" Fix the error message in cs_amp_read_cal_coeff() to say "Failed to read". It was incorrectly "Failed to write", probably a copy-paste error. Signed-off-by: Richard Fitzgerald --- sound/soc/codecs/cs-amp-lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/cs-amp-lib.c b/sound/soc/codecs/cs-amp-lib.c index e97a125ebbb3..fb5b950e584c 100644 --- a/sound/soc/codecs/cs-amp-lib.c +++ b/sound/soc/codecs/cs-amp-lib.c @@ -118,7 +118,7 @@ static int cs_amp_read_cal_coeff(struct cs_dsp *dsp, } =20 if (ret < 0) { - dev_err(dsp->dev, "Failed to write to '%s': %d\n", ctl_name, ret); + dev_err(dsp->dev, "Failed to read '%s': %d\n", ctl_name, ret); return ret; } =20 --=20 2.47.3