PCI: iproc: Remove redundant null pointer checking
authorBjorn Helgaas <bhelgaas@google.com>
Thu, 6 Oct 2016 18:36:08 +0000 (13:36 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 12 Oct 2016 03:41:07 +0000 (22:41 -0500)
The callers never pass a null "pcie" pointer (they check for kzalloc
failure), so we don't need to check here.  The bus driver should never call
the probe function with a null ->dev pointer, so we don't need to check
that either.  No functional change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/host/pcie-iproc.c

index 12a5156..e9210f6 100644 (file)
@@ -462,9 +462,6 @@ int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res)
        void *sysdata;
        struct pci_bus *bus;
 
-       if (!pcie || !pcie->dev)
-               return -EINVAL;
-
        dev = pcie->dev;
        ret = devm_request_pci_bus_resources(dev, res);
        if (ret)