PCI: endpoint: Fix NULL pointer dereference error when CONFIGFS is disabled
authorKishon Vijay Abraham I <kishon@ti.com>
Mon, 9 Jul 2018 20:18:56 +0000 (15:18 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 9 Jul 2018 20:19:51 +0000 (15:19 -0500)
commita83a2173441698f7ac9867b93bcca21cf18a032d
tree62ed69ff68963bd4c717c835df35973d5adece7d
parent35a88a18d7ea58600e11590405bc93b08e16e7f5
PCI: endpoint: Fix NULL pointer dereference error when CONFIGFS is disabled

commit ef1433f717a2 ("PCI: endpoint: Create configfs entry for each
pci_epf_device_id table entry") while adding configfs entry for each
pci_epf_device_id table entry introduced a NULL pointer dereference error
when CONFIG_PCI_ENDPOINT_CONFIGFS is not enabled.

Fix it here.

Fixes: ef1433f717a2 ("PCI: endpoint: Create configfs entry for each
pci_epf_device_id table entry")
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
[lorenzo.pieralisi: updated commit log]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/endpoint/pci-epf-core.c