From: Jan Beulich Date: Thu, 23 Jul 2015 12:03:41 +0000 (+0200) Subject: x86/MSI: drop bogus NULL check from pci_restore_msi_state() X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~2720 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=10f086ecbb2a4f9749e22412020e964a19c1b7fd;p=xen.git x86/MSI: drop bogus NULL check from pci_restore_msi_state() Commit 372900faf8 ("x86/MSI-X: reduce fiddling with control register during restore") introduced de-references of pdev before it gets checked against NULL. Instead of deferring the de-references, drop the pointless check - both call sites do that check already. Reported-by: Andrew Cooper Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --- diff --git a/xen/arch/x86/msi.c b/xen/arch/x86/msi.c index fa95048a45..e71e19f717 100644 --- a/xen/arch/x86/msi.c +++ b/xen/arch/x86/msi.c @@ -1354,9 +1354,6 @@ int pci_restore_msi_state(struct pci_dev *pdev) if ( !use_msi ) return -EOPNOTSUPP; - if ( !pdev ) - return -EINVAL; - ret = xsm_resource_setup_pci(XSM_PRIV, (pdev->seg << 16) | (pdev->bus << 8) | pdev->devfn);