From patchwork Tue Aug 20 02:59:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuesong Li X-Patchwork-Id: 13769269 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2074.outbound.protection.outlook.com [40.107.215.74]) (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 F124B3D3B3 for ; Tue, 20 Aug 2024 02:59:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.215.74 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724122777; cv=fail; b=L4dJXws214hFg7ytvmXasFg1XTzo+H09NpFv30V9XFWGCM8Pzgg4o3MH5gZkm9FbxIYUJOuXvF+aNj5kg/AH8QVh8ZEjy/EeffdniYZSpZv05AlI1Q5gDQetW70XIh93SqrJH+Ft1VCpp4UhD/NX2aUa8F0M7IdEcSPsHXbF+ok= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724122777; c=relaxed/simple; bh=IBOoBaVNx9AKYPKA86p9a+Wl++9+ND1ueObtTsMBoUY=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=U6FHq1LX2+AaJYD4XeEe/GSgqWsQ2PmheqrucG2RB9iWj9NrSavH5lnb04vyKWCh5ohL5ezoD+FhlZHloox00qwuhf/LeStBHdmzuit0BHxv/8LyXljiFowuzGaru92hQiDzu4BgQspBoa4sRjKX24vO5vBiQpK8HljdqP4xRWU= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=vivo.com; spf=pass smtp.mailfrom=vivo.com; dkim=pass (2048-bit key) header.d=vivo.com header.i=@vivo.com header.b=KMhOoO/1; arc=fail smtp.client-ip=40.107.215.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=vivo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=vivo.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=vivo.com header.i=@vivo.com header.b="KMhOoO/1" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ksoNfIGQ+iORrBWGgOd5GjA42apEJxhuQnTSBob2PmULngH5X6gqvvQsv8obJNAchj+z/HbSjO+Fd4U92D/AT7XI9ILuIVzbCXO7QsPruBDZN/804ouxfgECKuByUB8FfOY0jcdC5kmTaL14FOpErfGNOvwdegTrlTFN3Kp45aLyypjga4Q5Ryp0gKC6sqxhLBFewkzXk/aSi0M3RCM4jHx+y2II1dzhoqNRS8R3JliXsfkTa90F6DHvddlBf0s7mrmWlG9ouXeEuDFkCj99rFRheCIxkTvzT2GibFUaaE0AUiKT1bRBuljcdL997zX2rkKbmxVJEALTVMsrIeVBcA== 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=7IhBHtjhViEJCXGGxvgJMrhPHotzBLw8UYtdsZzBkN4=; b=RESGObqVcI3n+gmsXorKRHPYQ9TBQzfZXBmSLHpWnprFwXdE8roKoGPN8MlhqId0jFdh4SdnqAj2P/0w9RQ5bYlpTtz/jg2XPEr951lPWGs+Xze0jjknGix1DpJlnqZjfu98wnKxRgm+6ZdvVVMJnoqNwqVN2iNs9WQ+tnCxLioe6H/yFSgWf6awV7g8aXmUgkEBadVCpWPVonqkDsU3Axg8bJC6x1X3ILsAolOogtHjJbuylaegLZggO/FGN3qiy7R+RLmGWTmXcRemvi4aACTXkhspPz+fDCnZM+aVHy4872p1vg+XK8uOXwrn+JQ4xqtaRTuYGcR2fsWll1SviQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7IhBHtjhViEJCXGGxvgJMrhPHotzBLw8UYtdsZzBkN4=; b=KMhOoO/1eYjq7bsZcWZIGDhiOUBTs0NpTkGa9HVwJQRgSgc8uA8OdX9ZOWOOWi2Gt+Pr3fX4d2/7Wb16Kh06kj9a9sJxbgGJtWoEJxb6D+5RacJN6zZ5O98oUuQDmCv42syacyOb0osUaKMSCaYilnDanmvIpei99ey6zWqcJ1rlvZ0IBKaHG++qWz9YxBj5RfSE0G9jYtYqbLhFnAQ2NdQIGnL3+k4XPT6tCEyGEUE9GR+ik00KNxnCEy8lIJ6w13gFqLs66YvShnSafoNaZtCEB8Y0zra2pA0RYf4If/pRswEHhOSbaw4D+UG8eNtG1hroRlsOFC9u9Jfr4/lQMg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from TYZPR06MB5709.apcprd06.prod.outlook.com (2603:1096:400:283::14) by SEYPR06MB5858.apcprd06.prod.outlook.com (2603:1096:101:c1::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.21; Tue, 20 Aug 2024 02:59:29 +0000 Received: from TYZPR06MB5709.apcprd06.prod.outlook.com ([fe80::bc46:cc92:c2b6:cd1a]) by TYZPR06MB5709.apcprd06.prod.outlook.com ([fe80::bc46:cc92:c2b6:cd1a%7]) with mapi id 15.20.7849.021; Tue, 20 Aug 2024 02:59:29 +0000 From: Yuesong Li To: abelvesa@kernel.org, mturquette@baylibre.com, shawnguo@kernel.org, s.hauer@pengutronix.de, sboyd@kernel.org Cc: peng.fan@nxp.com, kernel@pengutronix.de, festevam@gmail.com, shengjiu.wang@nxp.com, linux-clk@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, opensource.kernel@vivo.com, Yuesong Li Subject: [PATCH v1] clk:clk-imx8-acm:fix wrong pointer check in clk_imx_acm_attach_pm_domains() Date: Tue, 20 Aug 2024 10:59:02 +0800 Message-Id: <20240820025902.2355565-1-liyuesong@vivo.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: TYCPR01CA0188.jpnprd01.prod.outlook.com (2603:1096:400:2b0::20) To TYZPR06MB5709.apcprd06.prod.outlook.com (2603:1096:400:283::14) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR06MB5709:EE_|SEYPR06MB5858:EE_ X-MS-Office365-Filtering-Correlation-Id: 36a6034f-1b03-4b96-66df-08dcc0c41b81 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: qomo7WYBbQJw1fSYGQFOrylWMeRMj3SQhf7oO83EM++sP23criWnwA4pGKjfPLpJESxnmRZfo3szFrkToFS2jQzDqQGkTavZobPow1NZiUPrK/D4UIjq4oEkermNTk058nY6yx2hBf6H7hS4wF0AdX3DqJBT7mTuZJk1MADB2CmFAuzJlayAT5TXnZt0dE2l5hnWh/Lvr1OTJNTtglDLME/KmrXccFljmrfWswZ1YBGFPVYTt1YS7MJ301Z0NWkE1KCUB+tCuNWOjQHiAjRHhYMJg6mrfmLbcENunV4wtyVTKttoL4P8XJx3wzHY0sOUGncJhW9URcqPQU0CgFPrOrM/NznY6q1aWMatIS2MZbygmZiicC6zkgn6xqMn+XNw+GI9zhM1BXbdl8mYwvTl/K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SFV:NSPM;H:TYZPR06MB5709.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: b64ZQM9tKEPlyr/F/iD5NmugMAGq7x3EQXHNCsfr975WsOMb7/Pdj5dXmQpVQXN1HuDCmVLDVvwjXv6HHJre53ZdGx5OMkAUsMpAOzbCG4Z4u6HFtDWhYoUujzTNk+go/FJYWO7bz4bpLWjbi7xe/L0krHammQZRVN6wsKCHJ+skgQwJi8PNj3I/gznppr8S1g6wgHcMmUnAxhwuDFQZyRnbx0hqHrqvwj3vTpsLbbOkMaIeocOVYFkVOHlc4kB3KpvBQ74RtBJ1rgpyWOjJHb0T7sISW4BPO6KxTstXiQA11ujS1PDV8RKYmyx0FJfHw3PYPYXJG9coI2OG4T7cKC7EQB85tkPl5wizyD+4WWudjoPB74hOklLdqe5KWMwS6rUSlfOZEAczVgkF8WRyTWQZQgc+sRikfOF1q7ijuSmqgGGCU2SMROoZrTrIxTTkxHBWXR662NO+ruWW5Fqii/+3677JPpfT0Ez476Jm3SGmhGiiGKPG9PUMf76TkVquxZLc7y4CqgU9NpRAaMnWzV2SyHFRLwUpkEpa/KAwbNjtLcn+z/5cp04hUFDBC8BvO1r+fdsoq8I5tf78xnHg1Wtg2B92gUpOypWYlAhfuHlrqBhcb07Pg0qFuiQ8h4XfW9s8bqYv0P+ynv2AzF+axGyDfQc9E1ccV7/beu+qtsDkDK2/UwxPaqrD/T5YoICtx0bXOoqINeI7b7vqMdIWkIb44furOs00Kn45e9hgCKD9+Chd0o9oxLBxUBD9DrWmCSdyE6q1r/laGwsAAm4bUSRGZi/Bpo2DgEEvaB1VxOawPlr0FYoD9l6mE5oNAVwuNQuWOS57ONVTYB+jSXN/7P+Wssy8Q1tGi1g/sm+8z3RQYidSKtadoNzK0HiblxE7n4kyhdCnMZH9d3tOmoxHYwqnNYwVdsomNIHhaauOBGRcu3XLSPsPhLMS/7Jgs1MzItnxnfhuzSnxC7Y9tuGpysqKgkrwxvBPuJxMbHTNT/kyNDANL02ZmWsj9spzb1N9hM9WwqrMaBugLFJdsOZBGvDMhlr3tmni91FbpvG9Kf7xRvXVqDiJuTwAr1Pq4LuPdnMn0cDI/PZa5tNqWsuB5yswKGvUnuoFF0OZYJQCo6OOFs46VRn22Sozv3s94sAI6m5cK36E9czdNnTr+ytdld+SLm8KiJSG7gSN1OgwXAM7kiDPP1g6RPdF9HjbodxNz7Cy5rDlwK4CfX97vuGAgeHR4Pa40vpCxeEvQpDCj4Wnk2ODq9gzDkuUK+jcrSYYC7WW9L05qRiQi6dncSqHB+OiJuFoJC5TPIOXsB6tqvvScsUfgz3EeFnkj1Y7ex+Nn/M8oyqnYHE9uPPAWd4WhdFvKqNe0j5UTYQfSgxZiwWcmn8xe45GxSPIlQcKdbnJ/2A8XfpdsEP2ZPbxqFAgQKY1fDh2wDFBrFOePyOwEXlZnloSjR1FLCZAKBKE7NLSWwtSQy4terEiPIVASCL/hMWz1yNjxjtCcB3l076YcQbbAgpJ+/+TIxyLPYAO1xVNKPiBjdhw68qZNKGtU91VhdxEMJVj7tz5bLnvaeE6EjE+9ge/oueq4zoFfkAI+rOe X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 36a6034f-1b03-4b96-66df-08dcc0c41b81 X-MS-Exchange-CrossTenant-AuthSource: TYZPR06MB5709.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Aug 2024 02:59:28.9321 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: qYkAQAvY0IVkXlX7ZpN/WJnwQ7eieX7fv/A2GPlKPBK7CWcBM0Jqo1zF9lfZ4cxcf92Sb1MkoJVGO59sgDAHcA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB5858 device_link_add() returns NULL pointer not PTR_ERR() when it fails,so replace the IS_ERR() check with NULL pointer check. Fixes: d3a0946d7ac9 ("clk: imx: imx8: add audio clock mux driver") Signed-off-by: Yuesong Li --- drivers/clk/imx/clk-imx8-acm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/imx/clk-imx8-acm.c b/drivers/clk/imx/clk-imx8-acm.c index 1bdb480cc96c..ed8cad8d6a57 100644 --- a/drivers/clk/imx/clk-imx8-acm.c +++ b/drivers/clk/imx/clk-imx8-acm.c @@ -289,7 +289,7 @@ static int clk_imx_acm_attach_pm_domains(struct device *dev, DL_FLAG_STATELESS | DL_FLAG_PM_RUNTIME | DL_FLAG_RPM_ACTIVE); - if (IS_ERR(dev_pm->pd_dev_link[i])) { + if (!dev_pm->pd_dev_link[i]) { dev_pm_domain_detach(dev_pm->pd_dev[i], false); ret = PTR_ERR(dev_pm->pd_dev_link[i]); goto detach_pm;