From: Andi Shyti Date: Wed, 1 Oct 2025 14:23:36 +0000 (+0200) Subject: drm/i915/gvt: Propagate vfio_set_irqs_validate_and_prepare() error X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a5e07980e62deeb849e59c9f14299ea3f291969e;p=thirdparty%2Fkernel%2Flinux.git drm/i915/gvt: Propagate vfio_set_irqs_validate_and_prepare() error 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 Reviewed-by: Zhenyu Wang Link: https://lore.kernel.org/r/20251001142336.82089-1-andi.shyti@linux.intel.com --- diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c index 183128b846305..c43b476878382 100644 --- a/drivers/gpu/drm/i915/gvt/kvmgt.c +++ b/drivers/gpu/drm/i915/gvt/kvmgt.c @@ -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),