From patchwork Fri Oct 27 00:09:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 738721 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 C37AEC25B6B for ; Fri, 27 Oct 2023 00:11:27 +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 06365DF0; Fri, 27 Oct 2023 02:10:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 06365DF0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1698365486; bh=AUIr9ERMTcJQ+hw2qoW2jaIGWZXpEFgQt6rtTSlIUQw=; h=From:Subject:To:Cc:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=PMf9Dw3MYlMoGngK6K3vD3Yjt51fsUAjbMZ69TTrbZmhcIE8xsZSSYbU+y1OEHh72 Dgae1ospWZCddOLvXDVB9488MSjYTlbu2pDK9U8ly33op/xJzJ8taClPkJjqYQzltI /fXbhcA4eIEmKGJzgTo1JiOwtcUHMvuOt+RLC4zM= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 447B1F80567; Fri, 27 Oct 2023 02:09:56 +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 C1AA9F80224; Fri, 27 Oct 2023 02:09:55 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 57D68F8055B; Fri, 27 Oct 2023 02:09:52 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20702.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::702]) (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 D6793F80557 for ; Fri, 27 Oct 2023 02:09:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D6793F80557 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=e8PGBlkZ ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DhN1s4xB8PSrkOsf26zlPOpMAlOZnxIkI4mvlaCqwhQQZ/st3sr4XKl8duumjNNt8c5tWM9f19iFQeNgNO2dSte0A9CddIa30aEbdiEOjaAnvqQhWVeeaCSIifGm4hwLW1GvQnbhH9A01KRx+QLQD6oETc/bRhgtvbKMtriSNMKskgBbfz3qLQmz740rWEtg36Hn4kHx+8bCBI9AvhZ+LPBLN45ZhVrmim9r0io0ZG0H/kpuIlAdkFbzVYdBYiYbqGfVp6XAINLIYFWheM/4cu3f2Ok+dTmI0F1sIt+JJUWM7ncdeJW+diIR+PruNjbDKzr7NxHa2wRZNDyzZuZ8UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=GY2V7hge4FijZ1C6Q6h5TcQ49Qr1BHfb3NymKkle7Sk=; b=KMp/9+8KNV1dbRWuQhRFXoaOyAj3JkN3AwUNxtNfOCfO0hjGGusiZpyKpvbWqiFicG8up9D0kWlLphL1j9lvlVnqqUUZ/1SD3yXWmDl5Pa1QrUAtehIfgnZw6d6d//93h6ljS1G/1FIsJfaDav1xue4boII0Kf8sUAycITivR1WS6bZVLgZdETOkw7ycJxoCAkYm625pMW5hhTs/EfB/CNKdH11Kx6dJwvmLatIct0J+nzG04bv1QgbWydcl574cmVaBUS1WPJjnu2Q6dguyiPS9i3P/kE0t1paS4C176RO1H9w8q8F4/nWRBbLSwJdHH1JqOj0TNNZmUXgVVNfL1Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GY2V7hge4FijZ1C6Q6h5TcQ49Qr1BHfb3NymKkle7Sk=; b=e8PGBlkZ+Cn+BQz+oQvEpatA9Hv61tQPWMeCI0SIRGb75TFtPp3Aff3vfzrQ1RF7FlcCuGnIAjx/kI6tKj2nSgvpz1tOpwOPmJ8U5BJpfARGj4QGR9mdflx0qP6I6QNhJQTT7JtOdWPqhlxLvn/GLgDof4r5autEdjJowuy0tp4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) by TYCPR01MB8788.jpnprd01.prod.outlook.com (2603:1096:400:18e::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.33; Fri, 27 Oct 2023 00:09:42 +0000 Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::9ac9:4ba4:a453:d84b]) by OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::9ac9:4ba4:a453:d84b%6]) with mapi id 15.20.6933.019; Fri, 27 Oct 2023 00:09:42 +0000 Message-ID: <87v8atq62i.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 1/2] ASoC: ams-delta.c: fixup cx81801_receive() parameter User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 To: Mark Brown , Dan Carpenter Cc: Linux-ALSA In-Reply-To: <87wmv9q632.wl-kuninori.morimoto.gx@renesas.com> References: <87wmv9q632.wl-kuninori.morimoto.gx@renesas.com> Date: Fri, 27 Oct 2023 00:09:41 +0000 X-ClientProxiedBy: TYAPR03CA0008.apcprd03.prod.outlook.com (2603:1096:404:14::20) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TYCPR01MB8788:EE_ X-MS-Office365-Filtering-Correlation-Id: 30e1cf19-fd94-4212-a9bc-08dbd681048a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iJrk+svhN8jDzTym/jMC2Tx2SstcAgOBSlRPGGicv51FENUWVwtShkR/DYjJv26oHdnpb289u2d05EJJRAKHw9SxCaBrsp73HUotJQLUAJRR0C7cfQD9RRdKcDFbfY8vxhFIsR4JnLxLecY71SM0qw3Lk0YzPsTaRtabmwGaQj6DZYY+D+MUXYNov8vpAaYicukQRtjqWuKvirAvV0CwGpsB88M9/hBuivTRddqd8UCGs4Uy8JAKEinnXQWqpYkqQi3C8wO/lgTXdX19ViGycALpt+tVWex+3EKL5JN/N61RXF6BYmeryc4AMvVWaHxB2sm4MAZ+tLO2xcKqrdmD+ZIKgrYR5oyFlevlalAhljxutsW2r2CDIM8N7u5QOA8vdYbCPPempQaU0SyWZA0FT43fumOpSKLUJ6XGzcgC1R/2BbsTUIDxJZrQV5PBqXU+6uaZc9nY4oxedQBqUbyPG6/knk+bAhPzp4RuCXv3LhGX2Ki9U5Tmu9dsm56W3U5Taa3lBWtpRmkbF4jCirabYl+5xbZW7u+ctCuCqta9lHFv/QcrV8bikxQOyCPiHURDiG/5v36P4sMKeIqYiP6Y0hQ4KOWDUU+6yfRPdZYwP4LZ2v0c2CQEr3tP4Bsc6dKz X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:OS3PR01MB8426.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(346002)(136003)(376002)(39860400002)(396003)(366004)(230922051799003)(64100799003)(451199024)(186009)(1800799009)(8676002)(8936002)(2906002)(38350700005)(41300700001)(4326008)(5660300002)(52116002)(2616005)(36756003)(26005)(38100700002)(6512007)(6506007)(83380400001)(66476007)(86362001)(66946007)(110136005)(316002)(478600001)(66556008)(6486002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4WEYI3kh5Zo6BpxbdKHmwUy2MfD3XBaESuPZ2q0vfUYue2liV97f5Vl/3KQEW5ISylUfxbCycp48VzMG/K78V8lhQVqiMELdy8bk6HKFf69a6s05/TvlYFg9bQcwDOADHrXdFmWI56V/fuU9JCHfFiiLoHAhzGVqy3sXixuboxylk4+IayuObzlYZQ3vN5cagE8gSmTRfPFY2/ACE4M2lufrN+L0QGtBtv1kw7Ehic5DUsnBYp1a4LP7VHPkijKeXC49cp0OyssQcvCYP2FQf39KCyKvXxIwfNfSaSEegCW2q7Q1tkixlh0EkLeO5k8wmlhBcYZssWoQ30eHUUwYm3XV2SHwydSHJDztvIUqVEk1ZwVMivueYxIWB+HJDOcGz8kPXoXBaiIQXMpurfw/BpkQ8k+XBzyZyAGZgOAlmlDA+6mFoT/G7GEyY3y4XsIZEALkyp0Hw9seIoZRb2d8iqOFzIsCqm8j/Hy9ChJaAEh92sYSMZK9DKnYX0x5f26nNIUMTFQwg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zwr/MbT4jmXNrABlVsGYI/HFHGqX1695xuit8Hv2Nsw= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 30e1cf19-fd94-4212-a9bc-08dbd681048a X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2023 00:09:42.1499 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Fht2g/0HBLRBspic78GY3/MbiIIxPvHJgz+Bns8c53qgDa3Su03kX0cguFFbuJuHJnX02iC2CTLRWn46elfhn+8divV4Y1Ys5v9aDo0BBtALuURNKFWRcRKs0TiummLd X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB8788 Message-ID-Hash: XPUQ2SJ2MIUVX7ART5X7DTLNAAA7I7JP X-Message-ID-Hash: XPUQ2SJ2MIUVX7ART5X7DTLNAAA7I7JP X-MailFrom: kuninori.morimoto.gx@renesas.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: This patch solves below compile error ${LINUX}/sound/soc/ti/ams-delta.c:405:24: error: initialization\ of 'void (*)(struct tty_struct *, const u8 *, const u8 *,\ size_t)' {aka 'void (*)(struct tty_struct *, const unsigned\ char *, const unsigned char *, long unsigned int)'} from \ incompatible pointer type 'void (*)(struct tty_struct *,\ const u8 *, const char *, int)' {aka 'void (*)(struct\ tty_struct *, const unsigned char *, const char *, int)'}\ [-Werror=incompatibl e-pointer-types] 405 | .receive_buf = cx81801_receive, | ^~~~~~~~~~~~~~~ Signed-off-by: Kuninori Morimoto --- sound/soc/ti/ams-delta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/ti/ams-delta.c b/sound/soc/ti/ams-delta.c index 687c1d969285..0c1ff65fcb86 100644 --- a/sound/soc/ti/ams-delta.c +++ b/sound/soc/ti/ams-delta.c @@ -337,7 +337,7 @@ static void cx81801_hangup(struct tty_struct *tty) /* Line discipline .receive_buf() */ static void cx81801_receive(struct tty_struct *tty, const u8 *cp, - const char *fp, int count) + const u8 *fp, size_t count) { struct snd_soc_component *component = tty->disc_data; const unsigned char *c; From patchwork Fri Oct 27 00:09:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 739088 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 48EBFC25B48 for ; Fri, 27 Oct 2023 00:11:30 +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 73CEADF6; Fri, 27 Oct 2023 02:10:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 73CEADF6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1698365487; bh=3KxTK0ZE9BUNKMjMxLzfTiEflQh2+mb/lSt9X4ZiVP8=; h=From:Subject:To:Cc:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=F9SC/h866c02Nwxz9MqOn1XN9hbX13YI0IwP/u0d0xCZH2b+zK+z3gA8t1iHZ2V+W 7Z3KJvUUzwZFXDTxelWukmiVIcA31RPVjxiCJbsfkqNGUaDwHizVVbu8Pmii3iJsUo p2JPHkoMHd6O18tmvPHyaW9ByYbV93sdutPS941c= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 87659F80579; Fri, 27 Oct 2023 02:10:11 +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 2527DF80571; Fri, 27 Oct 2023 02:10:11 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 46438F80571; Fri, 27 Oct 2023 02:10:08 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20716.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::716]) (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 B4A85F8056F for ; Fri, 27 Oct 2023 02:10:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B4A85F8056F Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=oNO3IbXC ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lOTjkP1Udm+j2M0J/oJZV7bBYUbAxL6y9wN8GFgc8B6WC5XH4A8qmjEVd6M3GQ5d1uTuLvydi/Zwy37SmsTtxK6QjgqbldrIF58Hxdg2PQggM5VAE5ylLp3Ng2fp3Jzqrlc6kbzKfd9YzZ/pqQZbbN5mfmFi8kG600eIAhEDiQ/2Ty0o00qx5YpuXi71ib53TYefIQ6STF/PUvcd8igOLM6wNv3zrFCqJ77AfBAk9uJ2b3PsGVdgxajJ2N3j1lU8s/9ZlZCvl52w4B8BQ86+ytOuyIssPhRCv3OlIr7S4rkIUJQpyZdceJhqgWPtVpK4z1Vljj786BKZwQxr2adf4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=ij3PciYT4w5XMQKZVCzxwgK0U6TTzeJMROJswCT6dzo=; b=fzSWoP3tAT/U88D9r+qk8AJl1Ck+eAlP0KykpWutm+ItnbQIDW/84c84ehEtZagdndTzz50IK5vz+IAjcJ9VVSEIBWxNC1G8RQGWoS/ks4YZzU/FQijqW2lc4cXoEKvAzXAwtQ8jReN9gGvQgyiKjrfAQM4LzqI50UV+fbPXDKrV0AsjPcdelF+pWPwUhFl1T2NQOsA+d8WyCv57p6nBZdVygEzSqE2el2lz9XxK57kjnUM/pHzusLnfqQiVnur7OUWM3rLUZZc8vCKH0xKxmA2XO7GqQAJr3crtL0y3IojEByABm8rF1FznEBC19SSLPPY2ioH18jsZzfwWK7Dytw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ij3PciYT4w5XMQKZVCzxwgK0U6TTzeJMROJswCT6dzo=; b=oNO3IbXCQ9JrH582SoHaeweC9qR6Aok+hw//tLX9hCFAkWJwQDKgj0MZe0DOpE/Kiu408jIywvPhFcBvMog8XM5sYE/0m9uI31BLOgCqj6sTi3zPHnw06DNFhTAomx7BN6OurvVpVL4euVIsrjLtCc6kMrqa4yrv8oSdM5unXxc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) by TYCPR01MB8788.jpnprd01.prod.outlook.com (2603:1096:400:18e::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.33; Fri, 27 Oct 2023 00:09:57 +0000 Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::9ac9:4ba4:a453:d84b]) by OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::9ac9:4ba4:a453:d84b%6]) with mapi id 15.20.6933.019; Fri, 27 Oct 2023 00:09:57 +0000 Message-ID: <87ttqdq623.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 2/2] ASoC: ams-delta.c: use component after check User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 To: Mark Brown , Dan Carpenter Cc: Linux-ALSA In-Reply-To: <87wmv9q632.wl-kuninori.morimoto.gx@renesas.com> References: <87wmv9q632.wl-kuninori.morimoto.gx@renesas.com> Date: Fri, 27 Oct 2023 00:09:56 +0000 X-ClientProxiedBy: TYCP286CA0335.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:38e::13) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TYCPR01MB8788:EE_ X-MS-Office365-Filtering-Correlation-Id: dd12c656-ce20-4a9d-be54-08dbd6810d95 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sFet2bnlVA5YbQGttbsrTGX3+Ob7mO9CFSd0Lj9hxizCaK03Ta5FkuL/JZeLM0zgJU2SEhU54a8WbVlTSlct0UWOi0NWIn4pXu/JTNaZ/MQyaV09c4PrfjvquLS8vn6FEdnGIDGzy6dae96k+0QkYskeCesbWFZE3OiYkXKSVvHtCqAo0XTOGWLdPKyKO5hdkOoqBi53D7CM3L+f1y3EdHSinzqvGhcdNjkYSoHaoI7DKiL/6bo7FvW2mlobRLgWyNB+ofnJv4YDWaYstPHoPqw6hI6/oWJV0XBU60bYr+koeFLHNzQHHZYuL1I7/JcuFSaG0ImWT707QpTkOmF9msC9LpHDi8/bMBtN1t/9KeFOVI5dz2tX+mTZcLMQqqBfiTXBuqfDmpoWnoHuLT04OwUmtShz4aZTsAVzZuLxzUEPUXLLrfjAtvOWJtDNs3IviXwGZjzkjFoXUREhLDNKqELoz9rSHAnFOctThv28vyKWcaH15xvN4zSY4hmraKeT2JUXA6ykU/1DS+ImpYc4NUBTg+Z3w1tNyw0aDtKCjpU/pv2GpTLoYnX70ITAchI/QWeHeLdFRJNKj4f3smD+Gizs4xqf8LtBMIEndWqCbkA= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:OS3PR01MB8426.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(346002)(136003)(376002)(39860400002)(396003)(366004)(230922051799003)(64100799003)(451199024)(186009)(1800799009)(8676002)(8936002)(2906002)(38350700005)(41300700001)(4326008)(5660300002)(52116002)(2616005)(36756003)(26005)(38100700002)(6512007)(6506007)(83380400001)(66476007)(86362001)(66946007)(110136005)(316002)(478600001)(66556008)(966005)(6486002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +DSd95KDNpC9v4a8d7GTlnExFBzH8dLM+9UCDZY+viaze652U4Xplc32a55nTKTSifUfOop5ZZ1Qf06nyTZJE4Wx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XN3vdMBJl7vkNrYceQKl9aqlLLi6p+KjVYPXvKb29eBHLmiOXF2InHsDftBmmKPsSg2jIoVJtcw4myTPg9ikdT2AoRZc15SF/IiPaSllzOw2BzZp4pX/FKKThtQcMsUkLb5bAOU13CsJ5LBr9X9/PaVPPQQtmHKeOlGARGqh7Ln8rVt5bpIASSVKpgFHNAKENrk8SBB0nQZO7KvWMMiA/UxV2+kVn2P+nyw2t7xR/jukbUuaZLl7VJlsk+laMwtRNxLBIp+3gAUl7u3PQgj7KL1SFEqdAgc6092tpbWYWQccJsrOxmf44q8avRpz4ETtt+afej5Yv0isNj/ez/NpvytwoA85g0Y9bsl5qCg/IX71k70PVOvxXTMlDRxeZ27l7P0ya/tIVyZluQUsEayIw/jxKPB7BAnkV355Gh4oTUFV7fxhjjUbcBwRVK8eSGwu36YLnrtpM1Yy1dKtUc5CIA/4hNE= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: dd12c656-ce20-4a9d-be54-08dbd6810d95 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2023 00:09:57.5985 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: rt/F0ves18Cti7JlIYARcmSIGtCFqyGSSlUHYeoqM5tl0dkURzCxOuStf9xPJptyEr6Z63NDGOZ3+ifvMUl0DEZ3D2vtro/gvHQ87NLp2B4jhD7eJ8s4fpPIKugpR9y6 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB8788 Message-ID-Hash: E3SKW2MS2P4CM2IWO5NRXYTC4WMTENAE X-Message-ID-Hash: E3SKW2MS2P4CM2IWO5NRXYTC4WMTENAE X-MailFrom: kuninori.morimoto.gx@renesas.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: static void cx81801_close() { ... (A) struct snd_soc_dapm_context *dapm = &component->card->dapm; ... (B) if (!component) return; } (A) uses component before NULL check (B). This patch moves it after (B). Fixes: d0fdfe34080c ("ASoC: cx20442: replace codec to component") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/3e608474-e99a-4866-ae98-3054a4221f09@moroto.mountain Signed-off-by: Kuninori Morimoto --- sound/soc/ti/ams-delta.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sound/soc/ti/ams-delta.c b/sound/soc/ti/ams-delta.c index 0c1ff65fcb86..bc54124adcb5 100644 --- a/sound/soc/ti/ams-delta.c +++ b/sound/soc/ti/ams-delta.c @@ -303,7 +303,7 @@ static int cx81801_open(struct tty_struct *tty) static void cx81801_close(struct tty_struct *tty) { struct snd_soc_component *component = tty->disc_data; - struct snd_soc_dapm_context *dapm = &component->card->dapm; + struct snd_soc_dapm_context *dapm; del_timer_sync(&cx81801_timer); @@ -315,6 +315,8 @@ static void cx81801_close(struct tty_struct *tty) v253_ops.close(tty); + dapm = &component->card->dapm; + /* Revert back to default audio input/output constellation */ snd_soc_dapm_mutex_lock(dapm);