Commit efdd4070 authored by Bjorn Helgaas's avatar Bjorn Helgaas

PCI: Remove dead code

"pdev" can never be NULL here, so remove the test.

Found by Coverity (CID 744313).
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent cad01f91
...@@ -1345,8 +1345,6 @@ static int pci_uevent(struct device *dev, struct kobj_uevent_env *env) ...@@ -1345,8 +1345,6 @@ static int pci_uevent(struct device *dev, struct kobj_uevent_env *env)
return -ENODEV; return -ENODEV;
pdev = to_pci_dev(dev); pdev = to_pci_dev(dev);
if (!pdev)
return -ENODEV;
if (add_uevent_var(env, "PCI_CLASS=%04X", pdev->class)) if (add_uevent_var(env, "PCI_CLASS=%04X", pdev->class))
return -ENOMEM; return -ENOMEM;
...@@ -1367,6 +1365,7 @@ static int pci_uevent(struct device *dev, struct kobj_uevent_env *env) ...@@ -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 >> 16), (u8)(pdev->class >> 8),
(u8)(pdev->class))) (u8)(pdev->class)))
return -ENOMEM; return -ENOMEM;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment