mmc: snps_sdhci: Add missing sentinel
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")
Signed-off-by Richard Genoud (Synaptics) <[email protected]>
--- drivers/mmc/snps_sdhci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
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) = {
Signature · 1 line
2.55.0
Quoted 16 lines · Richard Genoud (Synaptics)
Add the missing sentinel in
snps_sdhci_idsarray.The struct
udevice_idshould end with a sentinel to prevent an out-of-bound access.Fixes 1cf3e900affa ("mmc: snps_sdhci: Add sdhci driver support for TH1520 SoC")Signed-off-by Richard Genoud (Synaptics) <[email protected]>--- drivers/mmc/snps_sdhci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/mmc/snps_sdhci.c +0
-0
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) = {
Reviewed-by Tanmay Kathpalia <[email protected]>