Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
@@ -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;