提交 72bf809a 编写于 作者: K Konrad Rzeszutek Wilk

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: NJan Beulich <JBeulich@suse.com>
Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
上级 5fbdc103
...@@ -512,12 +512,7 @@ static void kill_domain_by_device(struct pcistub_device *psdev) ...@@ -512,12 +512,7 @@ static void kill_domain_by_device(struct pcistub_device *psdev)
int err; int err;
char nodename[PCI_NODENAME_MAX]; char nodename[PCI_NODENAME_MAX];
if (!psdev) { BUG_ON(!psdev);
dev_err(&psdev->dev->dev,
"device is NULL when do AER recovery/kill_domain\n");
return;
}
snprintf(nodename, PCI_NODENAME_MAX, "/local/domain/0/backend/pci/%d/0", snprintf(nodename, PCI_NODENAME_MAX, "/local/domain/0/backend/pci/%d/0",
psdev->pdev->xdev->otherend_id); psdev->pdev->xdev->otherend_id);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册