From: Matthew Wilcox Date: Wed, 13 May 2009 21:44:46 +0000 (-0600) Subject: Stop early if the VPD is corrupt X-Git-Tag: v3.1.3~10 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=9eaaf5c77719fbdbf10804a1597cc95ecc22ac89;p=pciutils.git Stop early if the VPD is corrupt I have several cards which report more-or-less garbage in their VPD. It can take an extraordinarily long time to read all their VPD and none of it is of interest. Instead, if we find an unknown resource type, just stop trying to read any more. Signed-off-by: Matthew Wilcox --- diff --git a/ls-vpd.c b/ls-vpd.c index a1696ee..6ded2d8 100644 --- a/ls-vpd.c +++ b/ls-vpd.c @@ -198,7 +198,7 @@ cap_vpd(struct device *d) default: printf("\t\tUnknown %s resource type %02x\n", (tag & 0x80) ? "large" : "small", tag & ~0x80); - break; + return; } res_addr += res_len;