aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/sdio_cis.c
diff options
context:
space:
mode:
authorPierre Ossman <drzeus@drzeus.cx>2009-03-05 19:37:28 +0100
committerPierre Ossman <drzeus@drzeus.cx>2009-03-24 21:30:00 +0100
commit0d6132ba0b006dd2bea9ba0c7b6b2f690cd95c40 (patch)
tree8678340b0a1a58364f6284b82466a97454639e6f /drivers/mmc/core/sdio_cis.c
parentomap_hsmmc: Initialize hsmmc controller registers when resuming (diff)
downloadlinux-dev-0d6132ba0b006dd2bea9ba0c7b6b2f690cd95c40.tar.xz
linux-dev-0d6132ba0b006dd2bea9ba0c7b6b2f690cd95c40.zip
sdio: handle cis end marker in link field
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc/core/sdio_cis.c')
-rw-r--r--drivers/mmc/core/sdio_cis.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mmc/core/sdio_cis.c b/drivers/mmc/core/sdio_cis.c
index 956bd7677502..6ba93f599281 100644
--- a/drivers/mmc/core/sdio_cis.c
+++ b/drivers/mmc/core/sdio_cis.c
@@ -227,6 +227,10 @@ static int sdio_read_cis(struct mmc_card *card, struct sdio_func *func)
if (ret)
break;
+ /* a size of 0xff also means we're done */
+ if (tpl_link == 0xff)
+ break;
+
this = kmalloc(sizeof(*this) + tpl_link, GFP_KERNEL);
if (!this)
return -ENOMEM;