projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cad01f9
)
PCI: Remove dead code
author
Bjorn Helgaas
<bhelgaas@google.com>
Sat, 5 Apr 2014 21:08:22 +0000
(15:08 -0600)
committer
Bjorn Helgaas
<bhelgaas@google.com>
Tue, 29 Apr 2014 23:36:44 +0000
(17:36 -0600)
"pdev" can never be NULL here, so remove the test.
Found by Coverity (CID 744313).
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pci-driver.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/pci/pci-driver.c
b/drivers/pci/pci-driver.c
index 650ce8935fd79825756cf83eb0f708d800cc0d21..ff236ed4f5cf4f6341a9fed1ea206bd865a93141 100644
(file)
--- 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;
}