• M
    i5400_edac: Avoid calling pci_put_device() twice · 0142877a
    Mauro Carvalho Chehab 提交于
    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: NMauro Carvalho Chehab <mchehab@redhat.com>
    0142877a
i5400_edac.c 39.6 KB