diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2014-04-06 01:08:22 +0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-04-30 03:36:44 +0400 |
commit | efdd4070f38e962d69c11f23c5aa033121a8cf0f (patch) | |
tree | f4d6d4261e626c06d94c6e146dcb0b41a858108c /drivers/pci/pci-driver.c | |
parent | cad01f9191226f069a0932a01b738bacde784a62 (diff) | |
download | linux-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/pci-driver.c')
-rw-r--r-- | drivers/pci/pci-driver.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 650ce8935fd7..ff236ed4f5cf 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; } |