mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 23:22:31 +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
This commit is contained in:
parent
734b5def91
commit
a1191a7735
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user