]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
xen/pciback: Do not dereference psdev during printk when it is NULL.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 29 Sep 2011 17:43:28 +0000 (13:43 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 29 Sep 2011 18:31:30 +0000 (14:31 -0400)
.. instead use printk(.. facility.

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

index aec214ac0a14134cfeebe0d24f50ff7918488ebd..32d6891ba5711e3eb0cfda009dcc643397a1ffe0 100644 (file)
@@ -514,9 +514,11 @@ 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");
+       if (!psdev) {
+               printk(KERN_ERR DRV_NAME
+                       ":device is NULL when do AER recovery/kill_domain\n");
+               return;
+       }
        snprintf(nodename, PCI_NODENAME_MAX, "/local/domain/0/backend/pci/%d/0",
                psdev->pdev->xdev->otherend_id);
        nodename[strlen(nodename)] = '\0';