[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] x86/MSI: drop bogus NULL check from pci_restore_msi_state()



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 <andrew.cooper3@xxxxxxxxxx>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

So they do.

Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

>
> --- 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);
>
>
>


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.