[PATCH master 1/6] net: smc1111: add missing drive's of_device_id array sentinel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ASAN on sandbox running allyesconfig detects that code reading
smc91c111_dt_ids reads out of bounds. This is because driver match tables
need to have sentinel elements, which was missing here. Fix this.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 drivers/net/smc91111.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/smc91111.c b/drivers/net/smc91111.c
index a23f2ad129ff..cc8f5ed362f4 100644
--- a/drivers/net/smc91111.c
+++ b/drivers/net/smc91111.c
@@ -1492,6 +1492,7 @@ static __maybe_unused struct of_device_id smc91c111_dt_ids[] = {
 	{
 		.compatible = "smsc,lan91c111",
 	},
+	{ /* sentinel */ },
 };
 
 static struct driver smc91c111_driver = {
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux