xen/pciback: Check dev_data before using it
authorRoss Lagerwall <ross.lagerwall@citrix.com>
Fri, 14 Dec 2018 12:55:45 +0000 (12:55 +0000)
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>
Mon, 17 Dec 2018 15:29:50 +0000 (10:29 -0500)
commit1669907e3d1abfa3f7586e2d55dbbc117b5adba2
tree623ecc6144a0983d5a7d0bc13f1abfa14207e819
parentbf9445a33ae6ac2f0822d2f1ce1365408387d568
xen/pciback: Check dev_data before using it

If pcistub_init_device fails, the release function will be called with
dev_data set to NULL.  Check it before using it to avoid a NULL pointer
dereference.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
drivers/xen/xen-pciback/pci_stub.c