mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
thermal: adc-tm: Ensure valid match data is obtained
Ensure that a valid compatible string match is obtained during probe before reading any further device tree parameters. Change-Id: Idd03cfce6cc2011052ffc7fb776d7be935214172 Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
This commit is contained in:
parent
3272d7797e
commit
10cd1eb248
1 changed files with 3 additions and 0 deletions
|
|
@ -214,6 +214,9 @@ static int adc_tm_get_dt_data(struct platform_device *pdev,
|
|||
return -EINVAL;
|
||||
|
||||
id = of_match_node(adc_tm_match_table, node);
|
||||
if (!id)
|
||||
return -EINVAL;
|
||||
|
||||
adc_tm->data = id->data;
|
||||
|
||||
adc_tm->ops = adc_tm->data->ops;
|
||||
|
|
|
|||
Loading…
Reference in a new issue