From: Dan Carpenter Date: Thu, 18 May 2017 07:34:31 +0000 (+0300) Subject: vfio: Use ERR_CAST() instead of open coding it X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7b3a10df1d4bd8a83934897442370221b4cd631b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git vfio: Use ERR_CAST() instead of open coding it It's a small cleanup to use ERR_CAST() here. Signed-off-by: Dan Carpenter Signed-off-by: Alex Williamson --- 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;