[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1561025421-19655-1-git-send-email-dingxiang@cmss.chinamobile.com>
Date: Thu, 20 Jun 2019 18:10:21 +0800
From: Ding Xiang <dingxiang@...s.chinamobile.com>
To: rubini@...dd.com
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] FMC: fix 'passing zero to PTR_ERR()' warning
Fix a static code checker warning:
drivers/fmc/fmc-debug.c:155
fmc_debug_init() warn: passing zero to 'PTR_ERR'
Signed-off-by: Ding Xiang <dingxiang@...s.chinamobile.com>
---
drivers/fmc/fmc-debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/fmc/fmc-debug.c b/drivers/fmc/fmc-debug.c
index 1734c7c..dd33951 100644
--- a/drivers/fmc/fmc-debug.c
+++ b/drivers/fmc/fmc-debug.c
@@ -152,7 +152,7 @@ int fmc_debug_init(struct fmc_device *fmc)
fmc->dbg_dir = debugfs_create_dir(dev_name(&fmc->dev), NULL);
if (IS_ERR_OR_NULL(fmc->dbg_dir)) {
pr_err("FMC: Cannot create debugfs\n");
- return PTR_ERR(fmc->dbg_dir);
+ return PTR_ERR_OR_ZERO(fmc->dbg_dir);
}
fmc->dbg_sdb_dump = debugfs_create_file(FMC_DBG_SDB_DUMP, 0444,
--
1.9.1
Powered by blists - more mailing lists