Message ID | 20240822025931.3455-1-11162571@vivo.com |
---|---|
State | New |
Headers | show
Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2071.outbound.protection.outlook.com [40.107.255.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 99DBF1CA9F; Thu, 22 Aug 2024 02:59:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.255.71 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724295592; cv=fail; b=lekmuUwY0t/hQGLiHXFarZnVOYIIt4XFDVYuBIdPdwEkagcedytmtFLGbhTER6AblMlUxqHlGftgYlzMyTyM2wVniYUSQGSmdGagz0QuMVJkRB9OKJdXE9AnSi1sJaIlbqjeo/y4p6QJwqShUnZ0NAwdq1qjfzYOZizEvA7PTeQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724295592; c=relaxed/simple; bh=yHLG89D8Ydj1oQcixYVTFCfv4+o/E3AFBB0mRWW+gcc=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=fr0dWqEctKHG9AQHY7duMpjX1VJLQk1FpWIoznbMTQB6nC9W/IehHkIEIDH1xlZ0E/Oz4cUr7tfCitYIymxSrusbtaMIAed1ur10Zrt8FAtfAuWquCzrPq5EueGd3f4Z4y71XfLG1tX7ZPZjnM6mLJ0aX+u+TkkeZ10kZesgqcE= 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=jsxj/5EI; arc=fail smtp.client-ip=40.107.255.71 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="jsxj/5EI" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=oOKalOLOWCVKjaxbMCsfkMoGvOYUBTnSKwsPXiIsvyDyEndpyHlgNnjjZcMLgMNxwVq7/+L4fpweW7ImaWGgxwB5ZL1esjlmFHaGAz53KC+JQ5PbSENdYgiaYkTIMyd6Xix1cTu+WWGtI+v7LAQZ16OY9oOf564BEzror1zCvvWPzkkE83hmUqk2xOlaiQaIoM6i0aIFFn6aP43eKV1LB3jdWJe1iSNlxbDDqawxETUqyklrvJGDpq2YrjAtPYOQsGSVkanV4wsIuEfTG2fMM8ZiEEZXXmp7F4LfefqCVfsfN0ST/o2h2W1x+5M76RC22IECroBRj4L/QBRE/FArcQ== 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=5ZOUbSHFskD89YaWWjWsl3E6nMfsh+q4/qRNr0QeRFg=; b=DED0iyK+/jcALQBubgVtiUYoteXJ7aNwhXaP9qKn19tWeDyJ1AT5ShtJEUB1BH/R63q+2ulwNNsHPPSnVzGtzJRPoLYOJY9Wgm9REotqjrhT2ZKvivGCXsVOPxeit42iuwneIuOU4QZfDS0SBRsGZRLBfZfDpiEmCPE/zZqAFtIqdS8X5FZHXg8cZ1i82qkzMw5sRLZ1MfNSzdEutTp3W1fD1+iwpVQ4yyt3EpbLD9q46sutl2EUw6R3TCF2ZaxxK/DgnvukDm2dQTbK54PITPfBkGqGqZzDYJ3GvGSVhp/pFDjtOkQWDnwYqKm6ozd07nWljH41Fhm6dWYjxfV3Zg== 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=5ZOUbSHFskD89YaWWjWsl3E6nMfsh+q4/qRNr0QeRFg=; b=jsxj/5EIEqkWuvMHaFKrJKqaG79HPVgA77Dabz09QKEZ4PnpfUe/EjOjKrVRCkA29cXe0Vi5iP4gFQuh6q2BgMvzJiHpTM5j1o7ueucaKXwnoripmQsOPqPgvVA5DOUBJGHfLc2jfejPKsmuYNt96YmzS8vfBdufnC98IuDrcPAz05HgbFgTaCy46Rs0/1V34N/HgQNc5E5mGDkWME6rYcedWQtRf9bV776wKo72BQXIkOG0+lHAdvFDDUnWzmNnhsA0ZIvDx4N2BSgcrPsAH1LAM963e2Z28yN2BfDrZL7UPgYaSqTTKyVoUY3xa9KUiWko0N7iuka+O6St3Dznlw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from TYZPR06MB6263.apcprd06.prod.outlook.com (2603:1096:400:33d::14) by JH0PR06MB7180.apcprd06.prod.outlook.com (2603:1096:990:98::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.19; Thu, 22 Aug 2024 02:59:45 +0000 Received: from TYZPR06MB6263.apcprd06.prod.outlook.com ([fe80::bd8:d8ed:8dd5:3268]) by TYZPR06MB6263.apcprd06.prod.outlook.com ([fe80::bd8:d8ed:8dd5:3268%6]) with mapi id 15.20.7875.019; Thu, 22 Aug 2024 02:59:45 +0000 From: Yang Ruibin <11162571@vivo.com> To: "Rafael J. Wysocki" <rafael@kernel.org>, Daniel Lezcano <daniel.lezcano@linaro.org>, Zhang Rui <rui.zhang@intel.com>, Lukasz Luba <lukasz.luba@arm.com>, Yang Ruibin <11162571@vivo.com>, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: opensource.kernel@vivo.com Subject: [PATCH v1] drivers:testing:Fix the NULL vs IS_ERR() bug for debugfs_create_dir() Date: Wed, 21 Aug 2024 22:58:54 -0400 Message-Id: <20240822025931.3455-1-11162571@vivo.com> X-Mailer: git-send-email 2.34.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: TYAPR01CA0224.jpnprd01.prod.outlook.com (2603:1096:404:11e::20) To TYZPR06MB6263.apcprd06.prod.outlook.com (2603:1096:400:33d::14) Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: <linux-pm.vger.kernel.org> List-Subscribe: <mailto:linux-pm+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-pm+unsubscribe@vger.kernel.org> MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR06MB6263:EE_|JH0PR06MB7180:EE_ X-MS-Office365-Filtering-Correlation-Id: 9b52c22f-c1d1-49af-14be-08dcc25679e0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|52116014|38350700014|81742002; X-Microsoft-Antispam-Message-Info: JVRO5SNSxSRcKDygOIbuuMNkAF2J3Lxc/Byc+6AIkIwFCM3ZzjmSjalmZCLNwP3nCL6lUC9QsFe+ZRjDqSuesIY2Vy+9VasZuy2LSQKpmuOhGSQH++Pgvc371Mxl0o+sG+l2vZbYHM15yHui+KUrwLlKkHKSOrnvL+QCMyx9o7hkFVOtkvAdoOjuFooUnEAMVRY8aLfTQaB/uFfIwfRyoAjgTzWgcI2yz1tQzSPk561UQ0mj3TD7FOvy/gjKH9yLLE/Os8bCdvt6mq8EawRbmbjDv4wwfRo+VPPMd42mxIAHpAs5izOfiBVdogOdm8gdu1Ll/XwdMOfhYjMvRX84t2ZSypbDzQPCVI86ygZMDj32E5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efront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYZPR06MB6263.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(52116014)(38350700014)(81742002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: MpOQvTGWNdGmOcWhUUf4FvQhxObgEX+pNu49Cse+zH4ohKuETHXgJGX5CSVPEYfE2PpuiuYV7zXUqfftVDroXW877ps2+BUVJ0pFvzNXnycFc7gI6AN3mlpkq8IZQufs83nvftwrx3mnQ4NM9pu2sA6Tc4BlCD3P7G5+syv8G9WRkgjU+OB0sa9dyIAT2t/yfNZFBAce2jTurOc0h2CRbc78heVnjm/8PK5daBlgZba57PVtktUYP8XbGzQ85wIessZybQcwZPyyzf+ggzcWsHnmU+2HGVajAXTrobgEVT+xYcIbdXw1OT7KpWLniErQTqx1l7SgueV1LXrzO3pwwzPkcohQCsx4grQumw9+R9Yq7dGooJaYarDxpZOjTBA7gQqckszt3DAD/A9DdT5VaDQ5bec7lKpI1HDNexrRwklN8O2FFPiHZV9qhnxA9jA+HQzvRPkB4YXyFnccR+rWTuNNQP4mGzD7ewvwC3eOba/2OGyTNTgWsY0oEmcGutPSzBPVvCCzbahCXDi8V2FDP7yuuycPjS+aZZvx3Wg+WyGp92jD9sUCVH85/PxD7PPC6Dy2i1tsurVylJClpc29R6a9Q6xtVt+IRu1VbG8ZgEIb31FVEPmh5pdMtVF2dNfZemZZBHPrxTUCQj41vWa1lki/ULp5PtrpAmuS2ZK1W/fjMhPle8gVTbZntG/qXylcoXiHgQtS8Zp+pMNYvL/v9TZXiUq08iLuZvFOHf/G4WneHwJsLpXRx927lBIDWdKWjrkzJBUjPOjTNJRWy6ldUB6W13xi5094iBQOXQRftpUcd+Jlzd2I92m+8ubJnvt1Xkp1Z45U9OA0LyzkHBN+dpg/39MFRB/1AooKZOpAE9XeVBMdoHXT/kc47oBekk3RRGLa6CBXv8gOl9jfPC6dIFbgAyO6LAESmrj1XZa3kwvshGWhScHZgo2rWnh69397HyJIzhmakczQTFPFj0KHxRvYsv5aWGB1zjOSFdvqXS6bV2ZJpGO5MQXwPD99hMj0HV1UEERkA1Pwzu+DDbGp7L2kVPr23Qy6YQA+6PEcvAUrlGd7ptQxAuNE/w5YK/zirrU3jRDpij80RJ1zEVFcMOisR6DW3pij7QSoT3Nx70akuyRhrWXAgm71FMXvRvM7WRFIQaICKWQ5/xLY+Lb6Fqwymyn6oWa0i11ejCXWl2MY7eOhuYZeUSjTVPtFUlAJTM3q4+uQU/ofg+RQw1BiAcaN+RI/jurCWhPDWCYbvHrE0nOP9YN39gBOC5CqfTloc1ifKHcD9XjIvzY9DvZP4LT/Xp0NmMJxnWhNaTZN6UT6qxkbW/eGe6UPabBujvz8AQBABUx1UHtuyQHJ7N2JoH7csB91YB3KOzrb6xYcq6VYFGhkAFT7X08Nm1AnLgxj8dm37mTs6TkviaWxTbsR7MY1RmfyUx/BaxvKrT6GgInAC3yQBe/oOlV23q+4wrOeD8RtMVnAj9OU0Tf1knMOnv+B6gH+LHOlV55T53WMkRh+jGwPfYEe9TTO+ZWQ/j1UlSZr3JTmE9yJyQPbxH5tPWfSi4fPnfGSTXpWCDbDIcoZboqTDY2ZerRquJ7w3MLk X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9b52c22f-c1d1-49af-14be-08dcc25679e0 X-MS-Exchange-CrossTenant-AuthSource: TYZPR06MB6263.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2024 02:59:44.9876 (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: xU2ElYgT8pqQWZQ2cDvpcmFoF4qWwUzUg6fQrNjxQAD6rlImWaozO68W79fXGg2WYbkaooh+GzrVwRBuxEKchw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: JH0PR06MB7180 |
Series |
[v1] drivers:testing:Fix the NULL vs IS_ERR() bug for debugfs_create_dir()
|
expand
|
diff --git a/drivers/thermal/testing/zone.c b/drivers/thermal/testing/zone.c index fcee12b152da..26f0f80a6a5d 100644 --- a/drivers/thermal/testing/zone.c +++ b/drivers/thermal/testing/zone.c @@ -167,7 +167,7 @@ static void tt_add_tz_work_fn(struct work_struct *work) snprintf(f_name, TT_MAX_FILE_NAME_LENGTH, "tz%d", tt_zone->id); tt_zone->d_tt_zone = debugfs_create_dir(f_name, d_testing); - if (!tt_zone->d_tt_zone) { + if (IS_ERR(tt_zone->d_tt_zone)) { tt_zone_free(tt_zone); return; }
The debugfs_create_dir() function returns error pointers. It never returns NULL. So use IS_ERR() to check it. Signed-off-by: Yang Ruibin <11162571@vivo.com> --- drivers/thermal/testing/zone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)