Re: [PATCH 1/1] vfio/pci: Fix error return code in vfio_ecap_init()

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

 



On Sat, 15 May 2021 10:04:58 +0800
Zhen Lei <thunder.leizhen@xxxxxxxxxx> wrote:

> The error code returned from vfio_ext_cap_len() is stored in 'len', not
> in 'ret'.
> 
> Fixes: 89e1f7d4c66d ("vfio: Add PCI device driver")
> Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
> Signed-off-by: Zhen Lei <thunder.leizhen@xxxxxxxxxx>
> ---
>  drivers/vfio/pci/vfio_pci_config.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/vfio/pci/vfio_pci_config.c b/drivers/vfio/pci/vfio_pci_config.c
> index d57f037f65b85d4..70e28efbc51f80e 100644
> --- a/drivers/vfio/pci/vfio_pci_config.c
> +++ b/drivers/vfio/pci/vfio_pci_config.c
> @@ -1581,7 +1581,7 @@ static int vfio_ecap_init(struct vfio_pci_device *vdev)
>  			if (len == 0xFF) {
>  				len = vfio_ext_cap_len(vdev, ecap, epos);
>  				if (len < 0)
> -					return ret;
> +					return len;
>  			}
>  		}
>  

Added to vfio for-linus branch for v5.13 w/ Max's R-b.  Thanks!

Alex




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux