From 271761c915897447eed72ca3787a1e7eb45814c7 Mon Sep 17 00:00:00 2001 From: David Vrabel Date: Wed, 7 Oct 2009 16:32:33 -0700 Subject: [PATCH] --- yaml --- r: 166945 b: refs/heads/master c: a1125b1e41228bc2e5b4f023004a4280282d1dab h: refs/heads/master i: 166943: 67d7f5037f0428d85f66231e3b5b49d5b6212e7b v: v3 --- [refs] | 2 +- trunk/drivers/mmc/core/sdio_cis.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index c2e51b145a33..66bf3a6db218 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a54fed9f70a2765f4476e1ce3d691a2f31df258f +refs/heads/master: a1125b1e41228bc2e5b4f023004a4280282d1dab diff --git a/trunk/drivers/mmc/core/sdio_cis.c b/trunk/drivers/mmc/core/sdio_cis.c index e1035c895808..f85dcd536508 100644 --- a/trunk/drivers/mmc/core/sdio_cis.c +++ b/trunk/drivers/mmc/core/sdio_cis.c @@ -29,6 +29,8 @@ static int cistpl_vers_1(struct mmc_card *card, struct sdio_func *func, unsigned i, nr_strings; char **buffer, *string; + /* Find all null-terminated (including zero length) strings in + the TPLLV1_INFO field. Trailing garbage is ignored. */ buf += 2; size -= 2; @@ -39,11 +41,8 @@ static int cistpl_vers_1(struct mmc_card *card, struct sdio_func *func, if (buf[i] == 0) nr_strings++; } - - if (nr_strings < 4) { - printk(KERN_WARNING "SDIO: ignoring broken CISTPL_VERS_1\n"); + if (nr_strings == 0) return 0; - } size = i;