1 From fb1bbb5b63e4e3c788a978724749ced57d208054 Mon Sep 17 00:00:00 2001
2 From: Minjie Du <duminjie@vivo.com>
3 Date: Thu, 21 Sep 2023 17:10:50 +0800
4 Subject: [PATCH 38/42] thermal/drivers/mediatek/lvts_thermal: Fix error check
7 debugfs_create_dir() function returns an error value embedded in
8 the pointer (PTR_ERR). Evaluate the return value using IS_ERR
9 rather than checking for NULL.
11 Signed-off-by: Minjie Du <duminjie@vivo.com>
12 Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
13 Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
14 Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
15 Link: https://lore.kernel.org/r/20230921091057.3812-1-duminjie@vivo.com
17 drivers/thermal/mediatek/lvts_thermal.c | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
20 --- a/drivers/thermal/mediatek/lvts_thermal.c
21 +++ b/drivers/thermal/mediatek/lvts_thermal.c
22 @@ -219,7 +219,7 @@ static int lvts_debugfs_init(struct devi
24 sprintf(name, "controller%d", i);
25 dentry = debugfs_create_dir(name, lvts_td->dom_dentry);
30 regset = devm_kzalloc(dev, sizeof(*regset), GFP_KERNEL);