Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit efdd4070 authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

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
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;
}