Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C267FCAC5B0 for ; Fri, 26 Sep 2025 00:19:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 206E210E2E3; Fri, 26 Sep 2025 00:19:28 +0000 (UTC) X-Greylist: delayed 599 seconds by postgrey-1.36 at gabe; Fri, 26 Sep 2025 00:19:26 UTC Received: from 9.mo576.mail-out.ovh.net (9.mo576.mail-out.ovh.net [46.105.56.78]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6F0D910E2E3 for ; Fri, 26 Sep 2025 00:19:26 +0000 (UTC) Received: from director5.ghost.mail-out.ovh.net (unknown [10.110.43.5]) by mo576.mail-out.ovh.net (Postfix) with ESMTP id 4cXrPw4bjsz5wBZ for ; Fri, 26 Sep 2025 00:03:00 +0000 (UTC) Received: from ghost-submission-5b5ff79f4f-x459c (unknown [10.110.178.32]) by director5.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 377D51001F2; Fri, 26 Sep 2025 00:02:58 +0000 (UTC) Received: from etezian.org ([37.59.142.106]) by ghost-submission-5b5ff79f4f-x459c with ESMTPSA id ntYtLTLY1WgltQIAvcneoQ (envelope-from ); Fri, 26 Sep 2025 00:02:58 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-106R006acecf765-2e3a-4495-9e33-170f8d491de4, 7ABF32FC6A42AA68F07093BAEB8416E50913B476) smtp.auth=andi@etezian.org X-OVh-ClientIp: 178.39.90.92 From: Andi Shyti To: intel-gfx , dri-devel Cc: Jonathan Cavitt , Andi Shyti , Andi Shyti Subject: [PATCH] drm/i915/gvt: Propagate vfio_set_irqs_validate_and_prepare() error Date: Fri, 26 Sep 2025 02:02:52 +0200 Message-ID: <20250926000252.3681360-1-andi.shyti@kernel.org> X-Mailer: git-send-email 2.51.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 15579077011979307714 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: dmFkZTE66knR8ViM5B4kWvbayG28X+6KGYpfcegFkNQ5JGCatzgzaI5B7khE3B+l/LOrTHuk0XnHRtLrnWFg5RakYuO68HBaDxnXXyxDxR9MsBMEExZIdfkzCBVuXFUVD60aFtd23SDWZf86VGsI3VLfHW3iGMaPaDrLZ1G3XleID7qcJ1wnfTyKHDr3zQvjBpySikgxu88dMU+nke0i5MMJOGM9ZhOp0iMnV3ETF1RKD6/A5+hRYtFotHP+CIxpFncdV5BFqwUrOQ0LU1XRj63AyncWwvm3mOqmfDXb4CWhk37tQAPh7mUfpSB9oM/kekN4t6TAVqe9XNxfFP4fh3Gh+6g4IQsg5luYPiPngyhzEoBz7tF3Zj+MWyYdZF6eQANqEMRTWicP8fpdEqICtFLFgVgBmZw07Hbk85yGpNR4lVwYvkZ7rJpAXjuVbrtqOceiAhNZCcW7Vi5xsrUcJofnXts62qGmyMIvWwSH/TYiujeOEilg0YUpGttrTMmNqiSYKlk30KCSNUkBOz8oPUHjm5r7CT2kjYuLJeRLp0Idv/EQa4ZCEve6VIrKkSkk9MSlQFds1B61cshgqfWOVRnRwJkt5SLSWFQVN+Rfu30QzBTfe0x5ycRsnHwuSyPIfynjHfxD6weCAghYOmz1uYdiesqSdDUhSj6aE986UdY8J+Efew X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Andi Shyti 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 --- drivers/gpu/drm/i915/gvt/kvmgt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c index 69830a5c49d3..450a4673c542 100644 --- a/drivers/gpu/drm/i915/gvt/kvmgt.c +++ b/drivers/gpu/drm/i915/gvt/kvmgt.c @@ -1367,8 +1367,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; } if (data_size) { data = memdup_user((void __user *)(arg + minsz), -- 2.51.0