summaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci-driver.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2014-04-05 15:08:22 -0600
committerBjorn Helgaas <bhelgaas@google.com>2014-04-29 17:36:44 -0600
commitefdd4070f38e962d69c11f23c5aa033121a8cf0f (patch)
treef4d6d4261e626c06d94c6e146dcb0b41a858108c /drivers/pci/pci-driver.c
parentcad01f9191226f069a0932a01b738bacde784a62 (diff)
downloadop-kernel-dev-efdd4070f38e962d69c11f23c5aa033121a8cf0f.zip
op-kernel-dev-efdd4070f38e962d69c11f23c5aa033121a8cf0f.tar.gz
PCI: Remove dead code
"pdev" can never be NULL here, so remove the test. Found by Coverity (CID 744313). Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pci-driver.c')
-rw-r--r--drivers/pci/pci-driver.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 650ce89..ff236ed 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -1345,8 +1345,6 @@ static int pci_uevent(struct device *dev, struct kobj_uevent_env *env)
return -ENODEV;
pdev = to_pci_dev(dev);
- if (!pdev)
- return -ENODEV;
if (add_uevent_var(env, "PCI_CLASS=%04X", pdev->class))
return -ENOMEM;
@@ -1367,6 +1365,7 @@ static int pci_uevent(struct device *dev, struct kobj_uevent_env *env)
(u8)(pdev->class >> 16), (u8)(pdev->class >> 8),
(u8)(pdev->class)))
return -ENOMEM;
+
return 0;
}
OpenPOWER on IntegriCloud