summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-09-29 21:43:28 +0400
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-10-20 00:58:17 +0400
commit72bf809a19d9fc97bfe39bb928149b5e0f202cb6 (patch)
tree08368e95973c981871886d37123d34c9219296ed /drivers
parent5fbdc10395cd500d6ff844825a918c4e6f38de37 (diff)
downloadlinux-72bf809a19d9fc97bfe39bb928149b5e0f202cb6.tar.xz
xen/pciback: Do not dereference psdev during printk when it is NULL.
.. instead use BUG_ON() as all the callers of the kill_domain_by_device check for psdev. Suggested-by: Jan Beulich <JBeulich@suse.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/xen/xen-pciback/pci_stub.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/xen/xen-pciback/pci_stub.c b/drivers/xen/xen-pciback/pci_stub.c
index 1b474804180a..3cc3fbe5bf8d 100644
--- a/drivers/xen/xen-pciback/pci_stub.c
+++ b/drivers/xen/xen-pciback/pci_stub.c
@@ -512,12 +512,7 @@ static void kill_domain_by_device(struct pcistub_device *psdev)
int err;
char nodename[PCI_NODENAME_MAX];
- if (!psdev) {
- dev_err(&psdev->dev->dev,
- "device is NULL when do AER recovery/kill_domain\n");
- return;
- }
-
+ BUG_ON(!psdev);
snprintf(nodename, PCI_NODENAME_MAX, "/local/domain/0/backend/pci/%d/0",
psdev->pdev->xdev->otherend_id);