> From: Liu, Yi L <yi.l.liu@xxxxxxxxx> > Sent: Wednesday, March 8, 2023 9:14 PM > > @@ -32,12 +32,8 @@ int vfio_iommufd_bind(struct vfio_device *vdev, > struct iommufd_ctx *ictx) > return 0; > } > > - /* > - * If the driver doesn't provide this op then it means the device does > - * not do DMA at all. So nothing to do. > - */ > - if (!vdev->ops->bind_iommufd) > - return 0; > + if (WARN_ON(!vdev->ops->bind_iommufd)) > + return -ENODEV; > this is not required given next patch adds the WARN_ON() at device registration. let's just remove the check (together in next patch).