From 9eaaf5c77719fbdbf10804a1597cc95ecc22ac89 Mon Sep 17 00:00:00 2001 From: Matthew Wilcox Date: Wed, 13 May 2009 15:44:46 -0600 Subject: [PATCH] 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 --- ls-vpd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.2