]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/i915/gvt: Propagate vfio_set_irqs_validate_and_prepare() error
authorAndi Shyti <andi.shyti@linux.intel.com>
Wed, 1 Oct 2025 14:23:36 +0000 (16:23 +0200)
committerAndi Shyti <andi.shyti@kernel.org>
Thu, 2 Oct 2025 10:09:30 +0000 (12:09 +0200)
Return the actual error code from vfio_set_irqs_validate_and_prepare()
instead of always collapsing to -EINVAL. While the helper
currently returns -EINVAL in most cases, passing through the real
error code is more future-proof.

While at it, drop the stray 'intel:' prefix from the error
message.

Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
Reviewed-by: Zhenyu Wang <zhenyuw.linux@gmail.com>
Link: https://lore.kernel.org/r/20251001142336.82089-1-andi.shyti@linux.intel.com
drivers/gpu/drm/i915/gvt/kvmgt.c

index 183128b846305807f7e9ef1cb792213c895e41e2..c43b4768783829880e3fc78c492d8ec433acaf68 100644 (file)
@@ -1369,8 +1369,8 @@ static long intel_vgpu_ioctl(struct vfio_device *vfio_dev, unsigned int cmd,
                        ret = vfio_set_irqs_validate_and_prepare(&hdr, max,
                                                VFIO_PCI_NUM_IRQS, &data_size);
                        if (ret) {
-                               gvt_vgpu_err("intel:vfio_set_irqs_validate_and_prepare failed\n");
-                               return -EINVAL;
+                               gvt_vgpu_err("vfio_set_irqs_validate_and_prepare failed\n");
+                               return ret;
                        }
 
                        data = memdup_user((void __user *)(arg + minsz),