From patchwork Tue Dec 17 01:48:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13910877 Received: from OS0P286CU010.outbound.protection.outlook.com (mail-japanwestazon11011023.outbound.protection.outlook.com [40.107.74.23]) (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 860B743AB9 for ; Tue, 17 Dec 2024 01:48:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.74.23 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734400128; cv=fail; b=n/BAAguV5sFP9Y9pWuqQ7m3kmXZCAj5e68gcPq08Q1dS8bAAy+WkxyNm+ivuXk2gj2iGan87zc7DmFPLFU0km4ClrKMW+gtuQ7Oe3mJVvP1/f4+PgA/zK1vDIitciYbtir99vHz7ZQNmM/OCacBs49LdAfdwgVpcQ2Ht3wL8Tn0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734400128; c=relaxed/simple; bh=RWRXr/aUyMR2s3+17Copbv5x3j/ZbDjR7g4ASZF5u68=; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type: Date:MIME-Version; b=N1V1wnDLB4bNgNJo5SP2B81KkqYTr619hyLoaNiT8Mh8/wbqFdSrtr4TV5uXmoOq5ai/XdlMsHithMQQ8a/EJhpiIjU2fD7vZ2Yxd0jP8C+SUwmG4kr2NKz4lOye52RUvP3yGkHGZ1oE63xbC5Lu+Sr19vCg119zcctjWZGxO9U= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b=DRGymu7e; arc=fail smtp.client-ip=40.107.74.23 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="DRGymu7e" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wN9Tk4TO2WxHkSpnqsded8sh1PsBf8IZ7ymWICPTVuKSnpXNkJ26HMEmtZaDODf5vAVgo023kFBvo9IVQ8f4lxlQi38BSq6yYCeAtULrCwqyTErkLKJPw4FLa1nPBh2OnIkBHv4bmD9JPJKZEU+ukRk31SE7WdncZbPzMPiMLLmYSmBxw/D5C8JMs8qaCt2mqt0DrxsSUaLPDA2+HEtgPy6flFudd9SIE+b2ipos88RJS3VkvXwAVLNQ5ePb2dlzvdDdFi4ndvqkAAPDJkoS9RcAW3QaAEhu24qU1CVmqNvF7lE4DbsuriY+iGpPBBnH0pH1QGwclgjbcesK5ex80g== 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=1WYTffNcMlytA6sJF7KR9FwZRGyM3o+Ej9gK5Ukvb7w=; b=snOjITEUZ5SSQ4/efetjkiKYRi2eRFlwy6PCZvP4T1bG8gmIjtl2pyzp4KTeb3DXj48q13WvBK6GpUN28UiydGqCjD5MoGz1bzNUJ8M5zrktV6Q92hX+iNFqdpQSm6tZ0Ai8k2VMLM6yER21gUfXY4qXi8TWcTae5Eh13mYDhw9tW+38tBdZyjNNVwJVAMHS8clxmhcl5KrmILO7tQcvFeNBdbmur0BT6YMhI5AqcWXCUTx2lzMb6VCsQ6DckQDhHD5bk96sPee2TX+xIz3oBy0qahVhjNxYvC2H+qBxmJhYMoT4bTSK7hanywiEDu4SfUBTP3PdOqPuq024H+JqdQ== 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=1WYTffNcMlytA6sJF7KR9FwZRGyM3o+Ej9gK5Ukvb7w=; b=DRGymu7eZDnGiQIUKLvuOHrCRUN0vSuDYKhPfBJzrMMfQZhJ09WNLsUNq1Her0qDorA0kRUAz/AR1qyd/EpIxGM/vc+wYkbr2cuHNFxWCNg9RG9WoSszRsGWFkzmP2wUJJvvpwoKwNBQv0VWQeaZBP3WUqsC4Hv6KVBRdW6vELY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by TYWPR01MB9279.jpnprd01.prod.outlook.com (2603:1096:400:1a2::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8251.22; Tue, 17 Dec 2024 01:48:44 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%4]) with mapi id 15.20.8251.015; Tue, 17 Dec 2024 01:48:44 +0000 Message-ID: <87wmfzm64j.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 4/6] ASoC: soc-core: return 0 if np was NULL on snd_soc_daifmt_parse_clock_provider_raw() User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 To: Mark Brown Cc: linux-sound@vger.kernel.org, Stephen Gordon In-Reply-To: <8734innkpy.wl-kuninori.morimoto.gx@renesas.com> References: <8734innkpy.wl-kuninori.morimoto.gx@renesas.com> Date: Tue, 17 Dec 2024 01:48:44 +0000 X-ClientProxiedBy: TYCPR01CA0106.jpnprd01.prod.outlook.com (2603:1096:405:4::22) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYWPR01MB9279:EE_ X-MS-Office365-Filtering-Correlation-Id: 96a6ba63-8ec9-487b-7ad3-08dd1e3cf0dd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016|52116014|38350700014; X-Microsoft-Antispam-Message-Info: wO6P8oVCp04amqhKhFsmSwUsbNV4uHPrDDV3bvRgFBnQHuWfDBZ9qufXnXe0cZR+WNncsRFqEHuFor2nCQVwByrDs5yLEceznd/BoAKngOBro+pY3KWxa6Uc1Lp2uIo0mObYyQJXkF64xMz5T/X1Y7XjZ57z5iiHz20kAVV56pdlPrACq95LeRDAWznK2lp8sRTkHt6LkBRJKhrsCqKC1wy+pP35SwBwT1MKGn3cCTKc8Oag7NNb1wTD1nKaKSTtOAw56Zemjnjpqb8J8W11Rz5Ou6UxHZlVzwJ1eazvtCmLBJHtiDLE+fgW+/myWOATp7r2sNVJ0W7IutCSzd4IwHkx8peLjem5517kEU/XDon3HycPtiI6UG31pe8QH0MVIhIoYFbi0fXRYnc6DgNJ37A0VznlzC3fd+ZdZDkzPVaQxAl5NfCGCmAustv5vFiznbxV7qijLFNM62IsKiGU8SV461OOKaaDeLh8RzMM4ok97M0iGh3mA4v+llwXmu2wwPeLOi6PmtPwhUOAyb+Pw14TNiZkpo+gZnK5xTr/QF/x6HHcyC1Yffo/RTdHkOxuH+4TMzExVcESidJjDwCTdEh3JfWOeXCET7tjz6TPeAlI7c6yI/tw9xS7qzh9KdZThCyCfKFtkjP66agPz1pHRpvRorpiJ/JPXJqX2uMU2NY+laGKnxf4qMH9MUJ+qydoXN6JBIF9HcD7T2rTYahalHXRppCBXyQWlztMNnGML5Z6qhmztztpoqbyoPTMdUER5NxaThF87r+2I88PJP0aN0ejeDZUUH2BLdDqzcVG3mp9W/MncQeVLWk7lSJWGKX7uWbe+aJBgkNzag/8Ctf8RUNDwFfvbxfr9eGni6UtApbfslm5KYsyR9iqRzj8G00Jnxy7toqNqYfZ+sX0MtepnJ18Gb+o0b1S+E7pKECSNXJF4Rd4yb61O7a3f96xC+AnnT6dQEhcSFHIzeDZuAh6jvCFO3KlmZ68oWrNgWXvCyqVf6p1iAaFbQckkCaWTfr5MkGGz4JgIHeZ8TzJVrAlmXZvgfdF7rBXelkAM69uaVoT3CLleb+Xo4mhgg9ApSnPWDBVDmfZmw5lej+BMKleJx8TGHlHGlUj/61eKZq/A+jN2g+IY4amaVwSOzJsTvWnpzjp2IFyveGlLXqBAnR2mnZDMmXMdKSfWIXDPcNwYJ2YaJhpxblNHK528S6xoTLM3B6+7LGrX8eGyAT1F+yskp5b0EyLHLXKtxGu4jDdo+fiytPa09M3auXFuu2vTCRoINYBNcu1iCl394Jfr3/mkeKbDbJBB71YkeevDNhXu1BVDrCtKIO0EbxbJvMx/IS3Q7j2Okkid6oxWuPHHUJRayLfaCtaupcsZIueNckCn4DYb+T2gJgt0+HDNNPx26PzHIJ0HfFFZioX1tKNEri/FwoJVezNgjTt4Ya0Zq2CLDDF93U+W5B8wN5Fq/2MTrIw X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYCPR01MB10914.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(366016)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 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AHXrtoPUWIS7CZEgz/vxb/IWAsjMGn2Yod/gh5ATC9v9N2akwpNdtOg8D1LfpLBf4PziiAkVsy9ECeYWFdN+xOAROYUOOTkbqRPFa4IgcAXaStT6t3CCveS954CdYynHOOJbebamIi4Ps6PEIYl9YZt7acICgjcalszdZmDD4pNMFhjo5wXsJHIznalOtFnGm2i9k/bVSjNPUdDKxPaex41ZFgUCCiKL1qCH8eRhft1i5n0NhYGWJxFf+ZNPJU/yprzjRO5gcZWMIBwY3EzvLxM19iLYId63LUz0IGmA6iZF9bsgPhjIt8KqLY1LN6oie4TiIaMvNZmpVMseon1uJecT2tX+ToQ8HDCRdWgwGSNNm/hcXxJe9mXedZokbKrB08J3DU7Ad+n3dRJ98QTxvKchfQJvyu1e3fPfhP8g/tEYlsgQ8t8WSTzRGte2YQYf81hlJGHT9oDIJka/jwqmFGO9JqWa1tZAAHnn+2cUmkwLAODz86UyDspItqchaSA5aNJ1XXNI7mwRniGVPdrPD3XFr8mb4KPMQUU0pA0a4pLdMCfGWsJSoq6YIX7+8gJmU5a1LkbC9ygafthgmQh7y2VxG4= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 96a6ba63-8ec9-487b-7ad3-08dd1e3cf0dd X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Dec 2024 01:48:44.5526 (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: /yekdKUp9mCFnf5m9OQsXG2j8zH+fvhMfaSRs5BxZZYcmtTqBUEyt+2jmN/Bh6LkTQho4gAwAUAjEwB4DFtvRaFSbhiNO/VQ2KFfX1QxA8oXFj/b8PZR7/p/Fywmi4dZ X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB9279 snd_soc_daifmt_parse_clock_provider_raw() might be called with NULL np. Return 0 in such case. Signed-off-by: Kuninori Morimoto --- sound/soc/soc-core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index c8b7f78b02f0a..426f8d8baa38b 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -3391,6 +3391,9 @@ unsigned int snd_soc_daifmt_parse_clock_provider_raw(struct device_node *np, char prop[128]; unsigned int bit, frame; + if (!np) + return 0; + if (!prefix) prefix = "";