Skip to content

Commit

Permalink
pcmcia: fix cisinfo_t removal
Browse files Browse the repository at this point in the history
The cisinfo_t removal patch (c5081d5
pcmcia: simplify pccard_validate_cis ) introduced a bug that prevented
card detection, for the (info->Chains == MAX_TUPLES) check was replaced
by (count), which is always true. Restoring the comparison to MAX_TUPLES
makes everybody happy...

[linux@dominikbrodowski.net: update changelog comment]
Signed-off-by: Marc Zyngier <marc.zyngier@altran.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
  • Loading branch information
Marc Zyngier authored and Dominik Brodowski committed Jul 15, 2008
1 parent d93c768 commit 002b90a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pcmcia/cistpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1490,7 +1490,7 @@ int pccard_validate_cis(struct pcmcia_socket *s, unsigned int function, unsigned
((tuple->TupleCode > 0x90) && (tuple->TupleCode < 0xff)))
reserved++;
}
if ((count) || (reserved > 5) ||
if ((count == MAX_TUPLES) || (reserved > 5) ||
((!dev_ok || !ident_ok) && (count > 10)))
count = 0;

Expand Down

0 comments on commit 002b90a

Please sign in to comment.