vfio: Use ERR_CAST() instead of open coding it
It's a small cleanup to use ERR_CAST() here. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
parent
7d57e5e933
commit
7b3a10df1d
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue