bnxt: Read VPD with pci_vpd_alloc()
authorHeiner Kallweit <hkallweit1@gmail.com>
Sun, 22 Aug 2021 13:55:23 +0000 (15:55 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Aug 2021 20:45:40 +0000 (21:45 +0100)
commitebcdc8ebe8acbaef5d130350a8082e12ac7d4e61
treec85ebc298f5d601fea83f9f58f062805b2ccc11d
parentda417885a99d36036cc7d2778f94b846e6582434
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.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c