Commit 7b3a10df authored by Dan Carpenter's avatar Dan Carpenter Committed by Alex Williamson

vfio: Use ERR_CAST() instead of open coding it

It's a small cleanup to use ERR_CAST() here.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
parent 7d57e5e9
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment