Author: jhb
Date: Mon Feb 13 19:51:59 2012
New Revision: 231610
URL: http://svn.freebsd.org/changeset/base/231610

Log:
  MFC 230340:
  Properly return success once a matching VPD entry is found in
  pci_get_vpd_readonly_method().  Previously the loop was always running
  to completion and falling through to failing with ENXIO.

Modified:
  stable/9/sys/dev/pci/pci.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/dev/pci/pci.c
==============================================================================
--- stable/9/sys/dev/pci/pci.c  Mon Feb 13 19:49:45 2012        (r231609)
+++ stable/9/sys/dev/pci/pci.c  Mon Feb 13 19:51:59 2012        (r231610)
@@ -1136,11 +1136,9 @@ pci_get_vpd_readonly_method(device_t dev
                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);
 }
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to