Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Jan 2012 19:50:12 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/164313: Fix pci_get_vpd_readonly_method
Message-ID:  <201201191950.q0JJoC3P060458@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/164313; it has been noted by GNATS.

From: John Baldwin <jhb@FreeBSD.org>
To: bug-followup@FreeBSD.org, chuck@tuffli.net
Cc:  
Subject: Re: kern/164313: Fix pci_get_vpd_readonly_method
Date: Thu, 19 Jan 2012 14:41:45 -0500

 Huh.  Might be even simpler to just return instead of breaking out of 
 the loop once vptr is found.
 
 Index: pci.c
 ===================================================================
 --- pci.c	(revision 230331)
 +++ pci.c	(working copy)
 @@ -1136,11 +1136,9 @@ pci_get_vpd_readonly_method(device_t dev, device_t
   		if (memcmp(kw, cfg->vpd.vpd_ros[i].keyword,
   		    sizeof(cfg->vpd.vpd_ros[i].keyword)) == 0) {
   			*vptr = cfg->vpd.vpd_ros[i].value;
 +			return (0);
   		}
 
 -	if (i != cfg->vpd.vpd_rocnt)
 -		return (0);
 -
   	*vptr = NULL;
   	return (ENXIO);
   }
 
 Does this work for you as well?
 
 -- 
 John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201191950.q0JJoC3P060458>