mmc_spi: Fix unterminated of_match_table
Subsystems (2)
PATCH 1/1 mmc_spi: Fix unterminated of_match_table
commit 2ffe8c5f323c3b9749bf7bc2375d909d20bdbb15 ("of: refactor of_modalias_node() and remove explicit match table"), introduced an unterminated of_match_table, which may cause kernel to oops.
This patch fixes the issue by adding an empty device ID.
--- drivers/mmc/host/mmc_spi.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/mmc/host/mmc_spi.c +1 -0
@@ -1536,6 +1536,7 @@ static int __devexit mmc_spi_remove(struct spi_device *spi)#if defined(CONFIG_OF )static struct of_device_id mmc_spi_of_match_table[]__devinitdata = { { .compatible ="mmc-spi-slot" , }, + {}, };#endif
Signature · 1 line
1.7.0.5
On Sun, Aug 8, 2010 at 8:14 AM, Anton Vorontsov <[email protected]> wro= te:
Quoted 7 lines
commit
2ffe8c5f323c3b9749bf7bc2375d909d20bdbb15("of: refactorof_modalias_node()and remove explicit match table"), introduced an unterminatedof_match_table, which may cause kernel to oops.This patch fixes the issue by adding an empty device ID.
Signed-off-by Anton Vorontsov <[email protected]>
Thanks Anton. Merged into my next-devicetree branch.
g.
drivers/mmc/host/mmc_spi.c static int __devexit mmc_spi_remove(struct spi_devi=
Quoted 9 lines
---
=A0drivers/mmc/host/mmc_spi.c | =A0 =A01 + =A01 files changed, 1 insertions(+), 0 deletions(-)drivers/mmc/host/mmc_spi.c +0
-0@@ -1536,6 +1536,7 @@ static int __devexit mmc_spi_remove(struct spi_devi=
ce *spi)
Quoted 2 lines
drivers/mmc/host/mmc_spi.c +0
-0=A0#if defined(CONFIG_OF)=A0static struct
of_device_idmmc_spi_of_match_table[]__devinitdata=3D =
{
Quoted 8 lines
=A0 =A0 =A0 =A0{ .compatible =3D "mmc-spi-slot", },
+ =A0 =A0 =A0 {},
=A0};
=A0#endif--
1.7.0.5
--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.