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

Commit c5470118 authored by Jordan Crouse's avatar Jordan Crouse
Browse files

msm: kgsl: Check for null pointer in kgsl_busmon_probe()



Check that the of_match_device() call returns a valid pointer in
kgsl_busmon_probe().

Change-Id: Ic0dedbad0f688f4273528ae313450253d669f2eb
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent e143b669
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2895,6 +2895,9 @@ static int kgsl_busmon_probe(struct platform_device *pdev)
	const struct of_device_id *pdid =
			of_match_device(busmon_match_table, &pdev->dev);

	if (pdid == NULL)
		return -ENXIO;

	device = (struct kgsl_device *)pdid->data;
	device->busmondev = &pdev->dev;
	dev_set_drvdata(device->busmondev, device);