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

Commit ea7a28ed authored by Himanshu Aggarwal's avatar Himanshu Aggarwal
Browse files

leds: leds-qpnp: Correctly terminate of_device_id array



Add missing NULL terminator for device match table in drivers leds-qpnp.c.
Without this, of_dev_lookup() may run off the end of the array looking
for bogus data.

Change-Id: Ie6c61b4500a5fbe792e3154a761c235573c7e6bf
CRs-Fixed: 582141
Signed-off-by: default avatarHimanshu Aggarwal <haggarwa@codeaurora.org>
parent 312d2603
Loading
Loading
Loading
Loading
+7 −2
Original line number Original line Diff line number Diff line
@@ -3693,10 +3693,15 @@ static int qpnp_leds_remove(struct spmi_device *spmi)


	return 0;
	return 0;
}
}

#ifdef CONFIG_OF
static struct of_device_id spmi_match_table[] = {
static struct of_device_id spmi_match_table[] = {
	{	.compatible = "qcom,leds-qpnp",
	{ .compatible = "qcom,leds-qpnp",},
	}
	{ },
};
};
#else
#define spmi_match_table NULL
#endif


static struct spmi_driver qpnp_leds_driver = {
static struct spmi_driver qpnp_leds_driver = {
	.driver		= {
	.driver		= {