On Linux the pci_get_*() iterators drop the reference of the device passed
as "from" once the next one has been looked up, so a loop like
while ((pch = pci_get_class(class, pch)))
does not leak anything. LinuxKPI allocates a new pci_dev for every device
it returns but never released "from", so each device but the last one was
leaked together with its kobject, its name and its path name. i915 does
exactly this in intel_detect_pch() and leaked a device at every load.
Drop the reference, but only for the devices created by lkpinew_pci_dev();
the pci_dev of a device attached to a driver belongs to the bus.