Skip to contentSkip to conversation

pcmcia: don't bale on invalid card headers

PATCH New Alan Cox 1 participant 1 message Oct 14, 2014 Pcmcia

lore
Share & tools
lore

Alan Cox

author
#0 lore raw

PATCH 1/1 pcmcia: don't bale on invalid card headers

There is no requirement a PCMCIA card has valid CIS data or even a CIS. The MTD layer correctly handles this but the core PCMCIA code erroneously refuses to accept the card and prevents the MTD driver from working in this case.

Tested with an Apple Newton 1MB SRAM card.

drivers/pcmcia/ds.c +0 -1
diff -u --new-file --recursive --exclude-from ac/.gitignore next/drivers/pcmcia/ds.c ac/drivers/pcmcia/ds.c
@@ -635,7 +635,6 @@
 	ret = pccard_validate_cis(s, &no_chains);
 	if (ret || !no_chains) {
 		dev_dbg(&s->dev, "invalid CIS or invalid resources\n");
-		return -ENODEV;
 	}
 
 	if (!pccard_read_tuple(s, BIND_FN_ALL, CISTPL_LONGLINK_MFC, &mfc))