Message ID | 171568193258.10875.15198718649707261237.tip-bot2@tip-bot2 |
---|---|
State | New |
Headers | show |
Series | [thermal:,thermal/fixes] thermal/drivers/mediatek/lvts_thermal: Check NULL ptr on lvts_data | expand |
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))