Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 10cd1eb2 authored by Guru Das Srinagesh's avatar Guru Das Srinagesh
Browse files

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: default avatarGuru Das Srinagesh <gurus@codeaurora.org>
parent 3272d779
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;