drm/i915/gvt: Fix uninitialized variable in handle_mmio()
authorDan Carpenter <dan.carpenter@linaro.org>
Fri, 26 Jan 2024 08:41:47 +0000 (11:41 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Feb 2024 18:10:49 +0000 (19:10 +0100)
commit41d5340cb01e1b076ae4d58cb91da9552bac64c4
treef49f1b8b979a796b88be86e457b43e5f240dcf62
parent4a5e31bdd3c1702b520506d9cf8c41085f75c7f2
drm/i915/gvt: Fix uninitialized variable in handle_mmio()

[ Upstream commit 47caa96478b99d6d1199b89467cc3e5a6cc754ee ]

This code prints the wrong variable in the warning message.  It should
print "i" instead of "info->offset".  On the first iteration "info" is
uninitialized leading to a crash and on subsequent iterations it prints
the previous offset instead of the current one.

Fixes: e0f74ed4634d ("i915/gvt: Separate the MMIO tracking table from GVT-g")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/11957c20-b178-4027-9b0a-e32e9591dd7c@moroto.mountain
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/i915/gvt/handlers.c