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

Commit b77dd423 authored by Xu Kai's avatar Xu Kai
Browse files

msm: fix incorrect termination of struct of_device_id arrays



qpnp-power-on.c and qpnp-usbdetect.c didn't correctly NULL-terminate
their devicetree match tables. This would result in of_dev_lookup()
running off the end of the array and looking at bogus data. Now fix
this kind of incorrect termination.

CRs-fixed: 582126
Change-Id: I44e9742af78614bd630e7d3e95dbf9f6bffc8955
Signed-off-by: default avatarXu Kai <kaixu@codeaurora.org>
parent 2c8ba2e7
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1309,8 +1309,8 @@ static int qpnp_pon_remove(struct spmi_device *spmi)
}

static struct of_device_id spmi_match_table[] = {
	{	.compatible = "qcom,qpnp-power-on",
	}
	{ .compatible = "qcom,qpnp-power-on", },
	{}
};

static struct spmi_driver qpnp_pon_driver = {
+2 −2
Original line number Diff line number Diff line
@@ -106,8 +106,8 @@ static int qpnp_usbdetect_remove(struct platform_device *pdev)
}

static struct of_device_id of_match_table[] = {
	{	.compatible = "qcom,qpnp-usbdetect",
	}
	{ .compatible = "qcom,qpnp-usbdetect", },
	{}
};

static struct platform_driver qpnp_usbdetect_driver = {