summaryrefslogtreecommitdiff
path: root/drivers/pci/vpd.c
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2021-04-01 19:37:47 +0300
committerBjorn Helgaas <bhelgaas@google.com>2021-04-30 22:38:32 +0300
commite947e7b1163d5a4375dc1ca6134ebda67ee7d33a (patch)
tree9c31a56a150e2ccdaf0a6b5cd42be9782009ff48 /drivers/pci/vpd.c
parentd1df5f3f4cfff88c989cbeec6ca0e02340494818 (diff)
downloadlinux-e947e7b1163d5a4375dc1ca6134ebda67ee7d33a.tar.xz
PCI/VPD: Change pci_vpd_init() return type to void
pci_init_capabilities() is the only caller and doesn't use the return value. So let's change the return type to void. Link: https://lore.kernel.org/r/663ec440-8375-1459-ddb4-98ea76e75917@gmail.com Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/vpd.c')
-rw-r--r--drivers/pci/vpd.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/pci/vpd.c b/drivers/pci/vpd.c
index cbf784ed5216..c1c4f7d80a04 100644
--- a/drivers/pci/vpd.c
+++ b/drivers/pci/vpd.c
@@ -327,18 +327,18 @@ static const struct pci_vpd_ops pci_vpd_f0_ops = {
.write = pci_vpd_f0_write,
};
-int pci_vpd_init(struct pci_dev *dev)
+void pci_vpd_init(struct pci_dev *dev)
{
struct pci_vpd *vpd;
u8 cap;
cap = pci_find_capability(dev, PCI_CAP_ID_VPD);
if (!cap)
- return -ENODEV;
+ return;
vpd = kzalloc(sizeof(*vpd), GFP_ATOMIC);
if (!vpd)
- return -ENOMEM;
+ return;
vpd->len = PCI_VPD_MAX_SIZE;
if (dev->dev_flags & PCI_DEV_FLAGS_VPD_REF_F0)
@@ -350,7 +350,6 @@ int pci_vpd_init(struct pci_dev *dev)
vpd->busy = 0;
vpd->valid = 0;
dev->vpd = vpd;
- return 0;
}
void pci_vpd_release(struct pci_dev *dev)