+38
−16
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
When i5400_edac driver is removed and re-loaded a few times, it causes
an OOPS, as it is currently decrementing some PCI device usage two
times.
When called inside a loop, pci_get_device() will call
pci_put_device(). That mangles the error count. In this specific
case, it seems easier to just duplicate the call.
Also fixes the error logic when pci_get_device fails.
Signed-off-by:
Mauro Carvalho Chehab <mchehab@redhat.com>