mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-28 09:39:00 +00:00
c36de2e73a
Backport almost 50 commits from upstream Linux to improve thermal drivers for MediaTek SoCs and add new LVTS driver for MT7988. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
30 lines
1.0 KiB
Diff
30 lines
1.0 KiB
Diff
From 5af4904adc8b840987000724977c13c706d3b7d8 Mon Sep 17 00:00:00 2001
|
|
From: Minjie Du <duminjie@vivo.com>
|
|
Date: Thu, 13 Jul 2023 12:24:12 +0800
|
|
Subject: [PATCH 31/42] thermal/drivers/mediatek/lvts: Fix parameter check in
|
|
lvts_debugfs_init()
|
|
|
|
The documentation says "If an error occurs, ERR_PTR(-ERROR) will be
|
|
returned" but the current code checks against a NULL pointer returned.
|
|
|
|
Fix this by checking if IS_ERR().
|
|
|
|
Signed-off-by: Minjie Du <duminjie@vivo.com>
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Link: https://lore.kernel.org/r/20230713042413.2519-1-duminjie@vivo.com
|
|
---
|
|
drivers/thermal/mediatek/lvts_thermal.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
--- a/drivers/thermal/mediatek/lvts_thermal.c
|
|
+++ b/drivers/thermal/mediatek/lvts_thermal.c
|
|
@@ -201,7 +201,7 @@ static int lvts_debugfs_init(struct devi
|
|
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++) {
|