Skip to contentSkip to conversation

mmc: snps_sdhci: Add missing sentinel

PATCH In review Richard Genoud (Synaptics) 2 participants 2 messages Nov 17 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: snps_sdhci: Add missing sentinel

Add the missing sentinel in snps_sdhci_ids array.

The struct udevice_id should end with a sentinel to prevent an out-of-bound access.

Fixes 1cf3e900affa ("mmc: snps_sdhci: Add sdhci driver support for TH1520 SoC")
---
 drivers/mmc/snps_sdhci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/snps_sdhci.c +2 -1
index fe834ec29692..4c1a7f1892aa 100644
@@ -429,7 +429,8 @@ static int snps_sdhci_bind(struct udevice *dev)
 }
 
 static const struct udevice_id snps_sdhci_ids[] = {
-	{ .compatible = "thead,th1520-dwcmshc" }
+	{ .compatible = "thead,th1520-dwcmshc" },
+	{ /* sentinel */ }
 };
 
 U_BOOT_DRIVER(snps_sdhci_drv) = {
Signature · 1 line
2.55.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 16 lines · Richard Genoud (Synaptics)

Add the missing sentinel in snps_sdhci_ids array.

The struct udevice_id should end with a sentinel to prevent an out-of-bound access.

Fixes 1cf3e900affa ("mmc: snps_sdhci: Add sdhci driver support for TH1520 SoC")
---
  drivers/mmc/snps_sdhci.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/snps_sdhci.c +0 -0
index fe834ec29692..4c1a7f1892aa 100644

drivers/mmc/snps_sdhci.c static int snps_sdhci_bind(struct udevice *dev) · line 436

Quoted 9 lines
drivers/mmc/snps_sdhci.c +2 -1
@@ -429,7 +429,8 @@ static int snps_sdhci_bind(struct udevice *dev)
  }
 
  static const struct udevice_id snps_sdhci_ids[] = {
-	{ .compatible = "thead,th1520-dwcmshc" }
+	{ .compatible = "thead,th1520-dwcmshc" },
+	{ /* sentinel */ }
  };
 
  U_BOOT_DRIVER(snps_sdhci_drv) = {