Kernel KVM virtualization development
 help / color / mirror / Atom feed
* [PATCH] vfio: Use ERR_CAST() instead of open coding it
@ 2017-05-18  7:34 Dan Carpenter
  2017-06-13 15:30 ` Alex Williamson
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2017-05-18  7:34 UTC (permalink / raw)
  To: Alex Williamson; +Cc: kvm, kernel-janitors

It's a small cleanup to use ERR_CAST() here.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

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;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-13 15:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-18  7:34 [PATCH] vfio: Use ERR_CAST() instead of open coding it Dan Carpenter
2017-06-13 15:30 ` Alex Williamson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox