Skip to content

Commit

Permalink
vfio: Use ERR_CAST() instead of open coding it
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Alex Williamson committed Jun 13, 2017
1 parent 7d57e5e commit 7b3a10d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/vfio/vfio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7b3a10d

Please sign in to comment.