From: Mauro Carvalho Chehab Date: Sun, 12 Feb 2012 11:21:34 +0000 (-0300) Subject: i5400_edac: Avoid calling pci_put_device() twice X-Git-Tag: v3.4-rc1~62^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0142877aa4e54dd9943fb727e9b386c36c8e3ab7;p=pandora-kernel.git i5400_edac: Avoid calling pci_put_device() twice 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 --- Reading git-diff-tree failed