mirror of
https://github.com/torvalds/linux.git
synced 2024-12-11 13:41:55 +00:00
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>
This commit is contained in:
parent
cad01f9191
commit
efdd4070f3
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user