From patchwork Thu Aug 22 13:23:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Ruibin <11162571@vivo.com> X-Patchwork-Id: 13773385 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2054.outbound.protection.outlook.com [40.107.255.54]) (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 EBA1F1CB316; Thu, 22 Aug 2024 13:24:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.255.54 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724333056; cv=fail; b=Rbkt2NE0I/FKw9wkcX4ByL6+Gd/3mfNXuQ5R36hvfqba3dVb0WHGkQfKjKA4s6aOOiAIXfDLbrFoFYMXnI5dqpr2DvFGOhnfzeCJGqHVkuCGDPtjE3Nij6Mu8M/oMRPqowSKu5n2EEDO4+jI4GTWovCkSHHbYfwHaYldsXjXHBk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724333056; c=relaxed/simple; bh=Kf+E9qi3rUTKuIJrqMVn0vNr7uITrKa0eINb/q3Pck0=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=Wq8EpXc0KBpKu3Zy5amQWvZItTX9JygHnKxxcts0wnOrM1TnmzzKApRe39QcCyB/G4zm7YZHv9LdcW48Meo576IU0uxRXQeXRpiPM34sEsThU/LTQjDUEOI7MzIR4R1OtoS4AokPTyDlsgvG1iZKYKsNVwxuKiVRKvPx916Bmi0= 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=ImylhNdk; arc=fail smtp.client-ip=40.107.255.54 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="ImylhNdk" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Tb9flu2/lpF1ZhytyHvXwDTQGN33tabVYfKktKW4z/hLF0ochJ9nm9H05aqHwcTS6VoDDBX2mSAMfESkZI9Z3Ym3KMh4eEUJN+2/NfeL1imJ2744fGcY5LeElB8/UcqTZleAlKaVg/T2QMZo8/MmYkz6fhmXgepQtpIlXFJhBXhhQDigTA1XnrQQHfL5IcpVxY2nr9L01Dd2aY7C+2ezJUNxrRs3kUv3nl15yVRHc8+VJhPLvtmzmGITR2wLL/G5drHPgO9zbmxzLt320BWcTyQNC0EKERDQSIFAdZi1S0RZ67ZLxYOeVaS8Cj6KnwVQVRRsiL04SuMPAmBJgLxEGg== 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=qieW1PYyjBvk2+Z6EzWyjxLuGaFaB7cWOp+sldeXDPQ=; b=NqER3WjEEdSrW8HpIlU55CWyvIaAaNsBBgofEw5ckg1A0bokmbSUtLUubEPFxa811NsdQr9XEeR5wFw8gJlLiq3KVp605+R1NhAtggGaxFcjXwp41MtEpk/lC8BWxsVhrvCuWT0VTYnTox9CkuhIWz1sNJJVHDERfokFaMh5jotY01hOePEyJhJ5h4MK1xbs7MRfstbeCftrfbfuTPjQW8XANTWikKUwm1HpsnLTQC4ruGtQvjO7YEN7Mk5expZKCFR9UxwWwN+hzAXMD1qgyg2r6pm/lMAsxO+EJCJn2aYFGUe9nEdWxqnZJN6CaYFtSwV+PCmZN1/WWMotwdD2NQ== 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=qieW1PYyjBvk2+Z6EzWyjxLuGaFaB7cWOp+sldeXDPQ=; b=ImylhNdkkSlb+shrf6iS/zNZGO8uxHnEgBj/DCOaglXAwHbmwMKGmM58FVOpPHOjQd1ffGe/C3b6ICLntJzSRA5n1ziuKcVG+LPAJ4hqn1p3in93UDXqV/qv7JB+b1dfhxiui5C+q2Zs0/7HwJO8dfV/gKEFCPTBroEAXSxUp1kl+6HDSdfUVO1yxWQcHv5eVseiZn/w76nC0Cz0pVrOCZLJgeynY4td1+I5LokB9aBaephfAwkbC0CbGhU0ccZf/SCS0BOrhLZuS+acyuZz7uwk8L520c63XpbAmxH+JceuD5uttFz/z70IbES/3mcvLh5uIF0bkc0288ztyLflXg== 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 SEZPR06MB6610.apcprd06.prod.outlook.com (2603:1096:101:179::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.25; Thu, 22 Aug 2024 13:24:08 +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 13:24:07 +0000 From: Yang Ruibin <11162571@vivo.com> To: Tony Luck , Borislav Petkov , Andy Whitcroft , Joe Perches , Dwaipayan Ray , Lukas Bulwahn , Ingo Molnar , linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org Cc: opensource.kernel@vivo.com, Yang Ruibin <11162571@vivo.com> Subject: [PATCH v2] drivers:block:Use IS_ERR() to check debugfs_create_dir() return value Date: Thu, 22 Aug 2024 21:23:58 +0800 Message-Id: <20240822132358.2416027-1-11162571@vivo.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: TYWP286CA0002.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:178::17) To TYZPR06MB6263.apcprd06.prod.outlook.com (2603:1096:400:33d::14) Precedence: bulk X-Mailing-List: linux-edac@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR06MB6263:EE_|SEZPR06MB6610:EE_ X-MS-Office365-Filtering-Correlation-Id: 1972f651-f6fd-4233-ecf7-08dcc2adb381 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|376014|366016|38350700014|81742002; X-Microsoft-Antispam-Message-Info: hcvUFt/og4YTpSYinRqO/3tHxCwHyNZLcQWCrwJ76M86NOyTbFZ7HxIumAOMc65HBNFC9GqnarnkkokTVAa7hDvH29tTZhODRrbLNKDtQyln2ZYj1w8jEabwi+3dWmvOKgJcieLzeJMHYYivT9uTqZuyj+OjTyl44v8UPwQ+/urKWfuPusbSkEqL4CKxlXHbSam5NkppYhoHzHVdnosfwUwu0bk2NC/lZlgSM+8x2BqBzODcPqxcns9+1549y94PakmSlulspky2sqiaUnKF7UlGivNZdaAXodiSrwhV57n+8lnzBe+3NBoTJTER8wDnd7fiBSoE/iWCCQf4QWj92y+/ARRF+CrpGXD784qijFMHgy/DLsECz7gBDtKEyc7Js/4ZTftCduUYAZoYbF3jNXNk0wAma8WX/CqDoX8jgIg89cBUKXM6a23Hj+vGRUCpz6+uE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06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(376014)(366016)(38350700014)(81742002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uE+Xft0SZ7TQGcekVSlYi9YzpRKbHBQGTzpwz5TUwEaZTepSaVuENK1NP7gXZZQfVsxlwSbC6Fa5Za7KaACifigityxeB3T0+SNrsPgJxdxQQOxUuJIu3X3PTLVWq2rdUxOt2/noUKbArQbAKGSdRiIzbsJ9eaVRSpGT0Xq5gjy6S0xEegCPRS3NS60krXhCslC4xkOdVI/Lou23yqMpRDOvrz8kIzDpQxa15+mcSwZ33zWmuHPA+cx3GSO9Tcy4/HS2i+MCThgI1qgOXoth3pWgANtAayv7qk0KALO+SiRhnpb5W+c9YyH7oxIebDrd8LEmwXTREW4Z9pGEa+XLapFS/dXyaaD2bSLeGo5p8any73awtG715I0bekAFENEJ3NVaq3ja4bnBPRdpiwRTgYqn8vDoKUf4E5lzbipesjNtWaIM1X48tzk+JnvOqTeComwGRPWviHSzjWkvevhCR8HtwyPOvpl2ZO4NeyygH/KxxefYie5tBvevJaoSr+cLlnx29AJAsbupuslhyBEGbXEWOd31lEtTDVCK+9cbvaacnnZIpWXEd4lCLvq0M/a/+nac7pkICki69T96oFtCBFuR0BO8Jm+z32aWS4X+HCmzVCiLrCwvp3lqbcRVE5QIakG6NLIOEQewiRuqksRrHkVzHngil9sX2UFB88INLYVmFUY+dTW3gtKgoOOwuxEHDr5e/98TEOufSDSk6rO3nBTXKWwP0LwNrZPRtRdlMkyWhjpq+0FjVqCKalxdQWVGy7EDJXYgtbsLx56hnpK8WlX1MwfP1WT/E+WoeiJyF/VApXmjgvnT6Ls7eA3OF+PPdSTkycnf9F8dmc+ULCgEH/if2yP4wmPvBNvR6jeDNdkhzbruJm7LlvDo91/Mj5aWan16Ry2jX7X3+FqOOd0k+O4y49WCU+FpVbFkYQR/9EYPJ/4juDUY0Rc1Sm99PkyryasPaS9MImYsplrCHoyus0+bDhOFcUbh5imzJL8DPOFpGOOnGJRTCboFZYa38Nseoob4PS4S7g97o8UVzbEupopIo/6RNQz1YJpWEBjdp7b3ttO/qtcyMFaHrmXBuLbth61EXuochAVkrHm+fieNEuT6E9pLdmsHToA1CgstC2jlQA6N1PFwx6z3zgq9gm1ECRSTB0KGhXccx2/uuhz/UJdwcYTKYDBI/vRCSsgeyK+ZEvXGEcAq0iKiL64nZMaNxETPLyTU/BMAYatSI9ktTC5dXIOkVahwy6sxHY9jT5QKyDP15ch2aKeF5Q7Drw1/PvaxZOb1VrxZaoj3CDq+bI8TrMC4wVDHvA+686TI0RvdnwXW8NyxTb6qLUvhbaqjjR1QYKY4yk95fYcePVV9W4FI1RQ999Pli2806NatyFGLQdglE7SkdAoWnJstglr2J0aPpaic2F7jJ3bwglF5U6B4xr2Da5kGo15uK6d6bTu1PzYElhQZnBueWb11C2BPBNEpgN9rEvBgmYaNsCtMBDz0+ZYn/+XIA6eRByRSKvkDR92K8uapICVw5/zTh6q4DjjvCahpUFyP7RzgAxhXXebjI/NwBFxhjna5tSIrAOiEqfg68ILEouRYpB5OzqDd X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1972f651-f6fd-4233-ecf7-08dcc2adb381 X-MS-Exchange-CrossTenant-AuthSource: TYZPR06MB6263.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2024 13:24:07.8711 (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: 8dQWEJA+DbICvBDeHDYqP3NoSM/xsSe5kVFweMbXWNtmKLuV8KHZ4EyMU0ZEK+XG0VfZ53SVx5duxKCWwiRbVQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB6610 The debugfs_create_dir() function returns error pointers.It never returns NULL. So use IS_ERR() to check its return value. Fixes: 011d82611172 ("RAS: Add a Corrected Errors Collector") Signed-off-by: Yang Ruibin <11162571@vivo.com> --- drivers/ras/cec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ras/cec.c b/drivers/ras/cec.c index e440b15fbabc..ebd4631b685b 100644 --- a/drivers/ras/cec.c +++ b/drivers/ras/cec.c @@ -489,7 +489,7 @@ static int __init create_debugfs_nodes(void) } d = debugfs_create_dir("cec", dfs); - if (!d) { + if (IS_ERR(d)) { pr_warn("Error creating cec debugfs node!\n"); return -1; }