]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitfc37cd1a479bc381432b5a33d1704455beb7443a
treec85ebc298f5d601fea83f9f58f062805b2ccc11d
parent678027f409e954ca0df4568e504d44dbe018492e
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