Re: [PATCH] vfio: Use ERR_CAST() instead of open coding it

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

 



On Thu, 18 May 2017 10:34:31 +0300
Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:

> It's a small cleanup to use ERR_CAST() here.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> 
> diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c
> index 561084ab387f..6a49485eb49d 100644
> --- a/drivers/vfio/vfio.c
> +++ b/drivers/vfio/vfio.c
> @@ -382,7 +382,7 @@ static struct vfio_group *vfio_create_group(struct iommu_group *iommu_group)
>  	if (IS_ERR(dev)) {
>  		vfio_free_group_minor(minor);
>  		vfio_group_unlock_and_free(group);
> -		return (struct vfio_group *)dev; /* ERR_PTR */
> +		return ERR_CAST(dev);
>  	}
>  
>  	group->minor = minor;

Applied to next branch for v4.13, thanks Dan!

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