bnx2x: Read VPD with pci_vpd_alloc()
authorHeiner Kallweit <hkallweit1@gmail.com>
Sun, 22 Aug 2021 13:53:23 +0000 (15:53 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Aug 2021 20:45:39 +0000 (21:45 +0100)
commitbed3db3d734e8e55815d865913ef75d9f707db96
tree36eec7cbf16df50afba2af881c1445454d073ec6
parent0df79c864636a209bf95ca93d986ca4cdd72bb89
bnx2x: 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/bnx2x/bnx2x.h
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c