PCI/VPD: Check Resource Item Names against those valid for type
authorBjorn Helgaas <bhelgaas@google.com>
Thu, 15 Jul 2021 21:59:56 +0000 (16:59 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 30 Jul 2021 18:36:46 +0000 (13:36 -0500)
commit70730db0f611a721fe652cfe92c7f94ccf687454
tree139978c6489920fdf1e6b92111d2c7dea20ea68a
parente2cdd86b561719da9ac928635f2a55b370dbb5b1
PCI/VPD: Check Resource Item Names against those valid for type

Previously, we checked for PCI_VPD_STIN_END, PCI_VPD_LTIN_ID_STRING, etc.,
outside the Large and Small Resource cases, so we checked Large Resource
Item Names against a Small Resource name and vice versa.

Move these tests into the Large and Small Resource cases, so we only check
PCI_VPD_STIN_END for Small Resources and PCI_VPD_LTIN_* for Large
Resources.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
drivers/pci/vpd.c