[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230713042413.2519-1-duminjie@vivo.com>
Date: Thu, 13 Jul 2023 12:24:12 +0800
From: Minjie Du <duminjie@...o.com>
To: "Rafael J. Wysocki" <rafael@...nel.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Amit Kucheria <amitk@...nel.org>,
Zhang Rui <rui.zhang@...el.com>,
Philipp Zabel <p.zabel@...gutronix.de>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>,
Minjie Du <duminjie@...o.com>,
Stephen Rothwell <sfr@...b.auug.org.au>,
linux-pm@...r.kernel.org (open list:THERMAL),
linux-kernel@...r.kernel.org (open list),
linux-arm-kernel@...ts.infradead.org (moderated list:ARM/Mediatek SoC
support),
linux-mediatek@...ts.infradead.org (moderated list:ARM/Mediatek SoC
support)
Cc: opensource.kernel@...o.com
Subject: [PATCH v1] drivers: mediatek: fix parameter check in lvts_debugfs_init()
Make IS_ERR() judge the debugfs_create_dir() function return
in lvts_debugfs_init().
Signed-off-by: Minjie Du <duminjie@...o.com>
---
drivers/thermal/mediatek/lvts_thermal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c
index b693fac2d..b46f351d1 100644
--- a/drivers/thermal/mediatek/lvts_thermal.c
+++ b/drivers/thermal/mediatek/lvts_thermal.c
@@ -190,7 +190,7 @@ static int lvts_debugfs_init(struct device *dev, struct lvts_domain *lvts_td)
int i;
lvts_td->dom_dentry = debugfs_create_dir(dev_name(dev), NULL);
- if (!lvts_td->dom_dentry)
+ if (IS_ERR(lvts_td->dom_dentry))
return 0;
for (i = 0; i < lvts_td->num_lvts_ctrl; i++) {
--
2.39.0
Powered by blists - more mailing lists