Re: [PATCH] PCI: fix default vga ref_count

From: Matthew Garrett
Date: Tue Sep 18 2012 - 19:54:40 EST


On Tue, Sep 18, 2012 at 04:44:42PM -0700, Yinghai Lu wrote:

> void vga_set_default_device(struct pci_dev *pdev)
> {
> + if (vga_default)
> + pci_dev_put(vga_default);
> +
> + if (pdev)
> + pdev = pci_dev_get(pdev);
> +
> vga_default = pdev;

It shouldn't happen, but do we want to check for the vga_default == pdev
case?

--
Matthew Garrett | mjg59@xxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/