Message ID | 20241025091310.15380-1-wanghai38@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/xe/migrate: Fix inappropriate error printing in xe_migrate_sanity_test() | expand |
diff --git a/drivers/gpu/drm/xe/tests/xe_migrate.c b/drivers/gpu/drm/xe/tests/xe_migrate.c index 1a192a2a941b..4542925445de 100644 --- a/drivers/gpu/drm/xe/tests/xe_migrate.c +++ b/drivers/gpu/drm/xe/tests/xe_migrate.c @@ -224,8 +224,8 @@ static void xe_migrate_sanity_test(struct xe_migrate *m, struct kunit *test) XE_BO_FLAG_VRAM_IF_DGFX(tile) | XE_BO_FLAG_PINNED); if (IS_ERR(tiny)) { - KUNIT_FAIL(test, "Failed to allocate fake pt: %li\n", - PTR_ERR(pt)); + KUNIT_FAIL(test, "Failed to allocate fake tiny: %li\n", + PTR_ERR(tiny)); goto free_pt; }
When creating pin map for tiny fails, the PTR_ERR(pt) is printed instead of PTR_ERR(tiny), which makes it impossible to accurately get the true cause of the error. Print PTR_ERR(tiny) after creating pin map for tiny fails. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Wang Hai <wanghai38@huawei.com> --- drivers/gpu/drm/xe/tests/xe_migrate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)