> + ret = vfio_register_group_dev(&vdev->vdev); > if (ret) { > dev_err(dev, "VFIO_FSL_MC: Failed to add to vfio group\n"); > - goto out_group_put; > + goto out_kfree; > } > + dev_set_drvdata(dev, vdev); > > + /* > + * FIXME: vfio_register_group_dev() allows VFIO_GROUP_GET_DEVICE_FD to > + * immediately return the device to userspace, but we haven't finished > + * setting it up yet. > + */ This should be trivial to fix. Can you throw in a patch to move the vfio_register_group_dev later?