[PATCH RFC] pcmcia: do not try to store more than 4 version strings
Dominik Brodowski
linux at dominikbrodowski.net
Sun Oct 18 19:03:24 EDT 2009
... for struct pcmcia_device only provides for 4 anyway.
Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>
---
drivers/pcmcia/ds.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index c70fb3b..f5b7079 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -583,7 +583,7 @@ static int pcmcia_device_query(struct pcmcia_device *p_dev)
if (!pccard_read_tuple(p_dev->socket, BIND_FN_ALL, CISTPL_VERS_1,
vers1)) {
- for (i=0; i < vers1->ns; i++) {
+ for (i = 0; i < min_t(unsigned int, 4, vers1->ns); i++) {
char *tmp;
unsigned int length;
--
1.6.0.4
More information about the linux-pcmcia
mailing list