From: "thermal-bot for Julien Panis" <tip-bot2@linutronix.de>
To: linux-pm@vger.kernel.org
Cc: Julien Panis <jpanis@baylibre.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
rui.zhang@intel.com, amitk@kernel.org
Subject: [thermal: thermal/fixes] thermal/drivers/mediatek/lvts_thermal: Check NULL ptr on lvts_data
Date: Tue, 14 May 2024 10:18:52 -0000 [thread overview]
Message-ID: <171568193258.10875.15198718649707261237.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20240502-mtk-thermal-lvts-data-v1-1-65f1b0bfad37@baylibre.com>
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))
prev parent reply other threads:[~2024-05-14 10:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=171568193258.10875.15198718649707261237.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=amitk@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=jpanis@baylibre.com \
--cc=linux-pm@vger.kernel.org \
--cc=rui.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).