From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH] x86/MSI: drop bogus NULL check from pci_restore_msi_state() Date: Thu, 23 Jul 2015 12:45:53 +0100 Message-ID: <55B0D3F1.9000506@citrix.com> References: <55B0EFA3020000780009486E@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZIEwo-0000Kx-KP for xen-devel@lists.xenproject.org; Thu, 23 Jul 2015 11:45:58 +0000 In-Reply-To: <55B0EFA3020000780009486E@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , xen-devel Cc: Keir Fraser List-Id: xen-devel@lists.xenproject.org On 23/07/15 12:44, Jan Beulich wrote: > 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 So they do. Reviewed-by: Andrew Cooper > > --- a/xen/arch/x86/msi.c > +++ b/xen/arch/x86/msi.c > @@ -1354,9 +1354,6 @@ int pci_restore_msi_state(struct pci_dev > if ( !use_msi ) > return -EOPNOTSUPP; > > - if ( !pdev ) > - return -EINVAL; > - > ret = xsm_resource_setup_pci(XSM_PRIV, > (pdev->seg << 16) | (pdev->bus << 8) | > pdev->devfn); > > >