提交 7b3a10df 编写于 作者: D Dan Carpenter 提交者: Alex Williamson

vfio: Use ERR_CAST() instead of open coding it

It's a small cleanup to use ERR_CAST() here.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册