]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
xen/pciback: Check if the device is found instead of blindly assuming so.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 29 Sep 2011 17:12:43 +0000 (13:12 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 29 Sep 2011 18:33:25 +0000 (14:33 -0400)
Just in case it is not found, don't try to dereference it.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/xen/xen-pciback/pci_stub.c

index d985b6586878752fe0e3ff1c4c3dbdcff16dc296..55086e9956cfafc71a16440a7d06349e04a2c8c9 100644 (file)
@@ -222,6 +222,8 @@ void pcistub_put_pci_dev(struct pci_dev *dev)
        }
 
        spin_unlock_irqrestore(&pcistub_devices_lock, flags);
+       if (!found_psdev)
+               return;
 
        /*hold this lock for avoiding breaking link between
        * pcistub and xen_pcibk when AER is in processing