Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 72bf809a authored by Konrad Rzeszutek Wilk's avatar Konrad Rzeszutek Wilk
Browse files

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: default avatarJan Beulich <JBeulich@suse.com>
Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
parent 5fbdc103
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -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);