bnxt: Read VPD with pci_vpd_alloc()
authorHeiner Kallweit <hkallweit1@gmail.com>
Sun, 22 Aug 2021 13:55:23 +0000 (15:55 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 24 Aug 2021 18:43:04 +0000 (13:43 -0500)
commit550cd7c1b45b568ccac28fd46663799f1ff8a62d
treebf433ab72493713cd4f998fd5495d6224307cf23
parent3831cba07a4bf96bc75fb963451a49d7f676c7d6
bnxt: Read VPD with pci_vpd_alloc()

Use pci_vpd_alloc() to dynamically allocate a properly sized buffer and
read the full VPD data into it.

This simplifies the code, and we no longer have to make assumptions about
VPD size.

Link: https://lore.kernel.org/r/62522a24-f39a-2b35-1577-1fbb41695bed@gmail.com
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/net/ethernet/broadcom/bnxt/bnxt.c