summaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2014-04-05 21:08:22 (GMT)
committerBjorn Helgaas <bhelgaas@google.com>2014-04-29 23:36:44 (GMT)
commitefdd4070f38e962d69c11f23c5aa033121a8cf0f (patch)
treef4d6d4261e626c06d94c6e146dcb0b41a858108c /drivers/pci
parentcad01f9191226f069a0932a01b738bacde784a62 (diff)
downloadlinux-efdd4070f38e962d69c11f23c5aa033121a8cf0f.tar.xz
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')
-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;
}