* [PATCH] thermal/drivers/mediatek/lvts_thermal: Check NULL ptr on lvts_data
@ 2024-05-02 13:46 Julien Panis
2024-05-02 13:57 ` Daniel Lezcano
2024-05-14 10:18 ` [thermal: thermal/fixes] " thermal-bot for Julien Panis
0 siblings, 2 replies; 3+ messages in thread
From: Julien Panis @ 2024-05-02 13:46 UTC (permalink / raw
To: Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Lukasz Luba,
Matthias Brugger, AngeloGioacchino Del Regno, Nicolas Pitre
Cc: linux-pm, linux-kernel, linux-arm-kernel, linux-mediatek,
Julien Panis
Verify that lvts_data is not NULL before using it.
Signed-off-by: Julien Panis <jpanis@baylibre.com>
---
At probe, verify that lvts_data is not NULL before using it.
---
drivers/thermal/mediatek/lvts_thermal.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c
index 86b2f44355ac..20a64b68f9c0 100644
--- a/drivers/thermal/mediatek/lvts_thermal.c
+++ b/drivers/thermal/mediatek/lvts_thermal.c
@@ -1271,6 +1271,8 @@ static int lvts_probe(struct platform_device *pdev)
return -ENOMEM;
lvts_data = of_device_get_match_data(dev);
+ if (!lvts_data)
+ return -ENODEV;
lvts_td->clk = devm_clk_get_enabled(dev, NULL);
if (IS_ERR(lvts_td->clk))
---
base-commit: 9c6ecb3cb6e20c4fd7997047213ba0efcf9ada1a
change-id: 20240502-mtk-thermal-lvts-data-4b19d0685024
Best regards,
--
Julien Panis <jpanis@baylibre.com>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] thermal/drivers/mediatek/lvts_thermal: Check NULL ptr on lvts_data
2024-05-02 13:46 [PATCH] thermal/drivers/mediatek/lvts_thermal: Check NULL ptr on lvts_data Julien Panis
@ 2024-05-02 13:57 ` Daniel Lezcano
2024-05-14 10:18 ` [thermal: thermal/fixes] " thermal-bot for Julien Panis
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Lezcano @ 2024-05-02 13:57 UTC (permalink / raw
To: Julien Panis, Rafael J. Wysocki, Zhang Rui, Lukasz Luba,
Matthias Brugger, AngeloGioacchino Del Regno, Nicolas Pitre
Cc: linux-pm, linux-kernel, linux-arm-kernel, linux-mediatek
On 02/05/2024 15:46, Julien Panis wrote:
> Verify that lvts_data is not NULL before using it.
>
> Signed-off-by: Julien Panis <jpanis@baylibre.com>
> ---
> At probe, verify that lvts_data is not NULL before using it.
> ---
Applied, thanks
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 3+ messages in thread
* [thermal: thermal/fixes] thermal/drivers/mediatek/lvts_thermal: Check NULL ptr on lvts_data
2024-05-02 13:46 [PATCH] thermal/drivers/mediatek/lvts_thermal: Check NULL ptr on lvts_data Julien Panis
2024-05-02 13:57 ` Daniel Lezcano
@ 2024-05-14 10:18 ` thermal-bot for Julien Panis
1 sibling, 0 replies; 3+ messages in thread
From: thermal-bot for Julien Panis @ 2024-05-14 10:18 UTC (permalink / raw
To: linux-pm; +Cc: Julien Panis, Daniel Lezcano, rui.zhang, amitk
The following commit has been merged into the thermal/fixes branch of thermal:
Commit-ID: a1191a77351e25ddf091bb1a231cae12ee598b5d
Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//a1191a77351e25ddf091bb1a231cae12ee598b5d
Author: Julien Panis <jpanis@baylibre.com>
AuthorDate: Thu, 02 May 2024 15:46:03 +02:00
Committer: Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Thu, 02 May 2024 15:56:41 +02:00
thermal/drivers/mediatek/lvts_thermal: Check NULL ptr on lvts_data
Verify that lvts_data is not NULL before using it.
Signed-off-by: Julien Panis <jpanis@baylibre.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20240502-mtk-thermal-lvts-data-v1-1-65f1b0bfad37@baylibre.com
---
drivers/thermal/mediatek/lvts_thermal.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c
index 86b2f44..20a64b6 100644
--- a/drivers/thermal/mediatek/lvts_thermal.c
+++ b/drivers/thermal/mediatek/lvts_thermal.c
@@ -1271,6 +1271,8 @@ static int lvts_probe(struct platform_device *pdev)
return -ENOMEM;
lvts_data = of_device_get_match_data(dev);
+ if (!lvts_data)
+ return -ENODEV;
lvts_td->clk = devm_clk_get_enabled(dev, NULL);
if (IS_ERR(lvts_td->clk))
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-05-14 10:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-02 13:46 [PATCH] thermal/drivers/mediatek/lvts_thermal: Check NULL ptr on lvts_data Julien Panis
2024-05-02 13:57 ` Daniel Lezcano
2024-05-14 10:18 ` [thermal: thermal/fixes] " thermal-bot for Julien Panis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).