Mirsad Todorovac
cb57c75098
drm/xe: fix the ERR_PTR() returned on failure to allocate tiny pt
Running coccinelle spatch gave the following warning:
./drivers/gpu/drm/xe/tests/xe_migrate.c:226:5-11: inconsistent IS_ERR
and PTR_ERR on line 228.
The code reports PTR_ERR(pt) when IS_ERR(tiny) is checked:
→ 211 pt = xe_bo_create_pin_map(xe, tile, m->q->vm, XE_PAGE_SIZE,
212 ttm_bo_type_kernel,
213 XE_BO_FLAG_VRAM_IF_DGFX(tile) |
214 XE_BO_FLAG_PINNED);
215 if (IS_ERR(pt)) {
216 KUNIT_FAIL(test, "Failed to allocate fake pt: %li\n",
217 PTR_ERR(pt));
218 goto free_big;
219 }
220
221 tiny = xe_bo_create_pin_map(xe, tile, m->q->vm,
→ 222 2 * SZ_4K,
223 ttm_bo_type_kernel,
224 XE_BO_FLAG_VRAM_IF_DGFX(tile) |
225 XE_BO_FLAG_PINNED);
→ 226 if (IS_ERR(tiny)) {
→ 227 KUNIT_FAIL(test, "Failed to allocate fake pt: %li\n",
→ 228 PTR_ERR(pt));
229 goto free_pt;
230 }
Now, the IS_ERR(tiny) and the corresponding PTR_ERR(pt) do not match.
Returning PTR_ERR(tiny), as the last failed function call, seems logical.
Fixes: dd08ebf6c3 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Signed-off-by: Mirsad Todorovac <mtodorovac69@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241121212057.1526634-2-mtodorovac69@gmail.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2024-12-09 11:47:17 -05:00
..
2024-12-02 11:34:44 -08:00
2024-11-04 17:53:09 +09:00
2024-12-06 13:47:55 -08:00
2024-11-12 16:41:45 +00:00
2024-11-29 11:58:27 -08:00
2024-11-26 18:05:44 -08:00
2024-12-01 15:12:43 -08:00
2024-12-02 11:34:44 -08:00
2024-12-08 11:38:56 -08:00
2024-12-01 15:12:43 -08:00
2024-12-05 10:00:20 -07:00
2024-12-01 15:12:43 -08:00
2024-11-29 11:58:27 -08:00
2024-12-01 15:12:43 -08:00
2024-12-03 08:22:25 -08:00
2024-12-01 15:12:43 -08:00
2024-12-02 11:34:44 -08:00
2024-12-01 15:12:43 -08:00
2024-11-05 14:01:07 +01:00
2024-12-02 11:34:44 -08:00
2024-11-23 10:44:31 -08:00
2024-12-01 15:12:43 -08:00
2024-12-03 08:22:25 -08:00
2024-12-02 11:34:44 -08:00
2024-12-02 11:34:44 -08:00
2024-12-01 15:12:43 -08:00
2024-12-03 08:22:25 -08:00
2024-12-06 11:52:15 -08:00
2024-11-03 08:39:07 -08:00
2024-12-01 15:12:43 -08:00
2024-12-01 15:12:43 -08:00
2024-11-25 17:12:54 -08:00
2024-12-02 11:34:44 -08:00
2024-12-02 11:34:44 -08:00
2024-12-01 15:12:43 -08:00
2024-12-03 08:22:25 -08:00
2024-12-09 11:47:17 -05:00
2024-11-05 05:33:46 +01:00
2024-12-05 10:06:47 -08:00
2024-12-01 15:12:43 -08:00
2024-12-01 15:12:43 -08:00
2024-12-01 15:12:43 -08:00
2024-12-03 08:22:25 -08:00
2024-12-01 15:12:43 -08:00
2024-12-01 15:12:43 -08:00
2024-12-03 08:22:25 -08:00
2024-12-01 15:12:43 -08:00
2024-11-11 15:48:50 +01:00
2024-12-08 11:26:13 -08:00
2024-12-02 11:34:44 -08:00
2024-11-25 10:31:39 -08:00
2024-11-05 01:32:05 +02:00
2024-12-05 15:02:20 -08:00
2024-12-08 11:54:04 -08:00
2024-11-09 09:14:12 -08:00
2024-12-02 11:34:44 -08:00
2024-12-01 15:12:43 -08:00
2024-11-30 09:03:16 -08:00
2024-12-02 11:34:44 -08:00
2024-12-03 15:06:27 -07:00
2024-12-02 11:34:44 -08:00
2024-12-01 15:12:43 -08:00
2024-12-01 15:12:43 -08:00
2024-11-20 21:38:24 -05:00
2024-12-02 11:34:44 -08:00
2024-12-02 11:34:44 -08:00
2024-12-02 15:37:16 +01:00
2024-11-30 10:32:47 -08:00
2024-12-05 10:25:06 -08:00
2024-10-30 16:07:38 -05:00
2024-12-02 11:34:44 -08:00
2024-12-05 10:14:36 -07:00
2024-12-01 15:12:43 -08:00
2024-12-01 15:12:43 -08:00
2024-11-27 14:40:33 -08:00
2024-12-01 15:12:43 -08:00
2024-12-01 15:12:43 -08:00
2024-12-02 11:34:44 -08:00
2024-12-01 15:12:43 -08:00
2024-12-02 11:34:44 -08:00
2024-12-02 11:34:44 -08:00
2024-11-29 11:43:29 -08:00
2024-12-02 11:34:44 -08:00
2024-12-04 10:28:30 -08:00
2024-12-06 11:24:00 -08:00
2024-11-28 09:28:09 -08:00
2024-12-02 11:34:44 -08:00
2024-12-01 15:12:43 -08:00
2024-11-15 00:32:29 +11:00
2024-12-05 10:25:06 -08:00
2024-12-03 08:22:25 -08:00
2024-11-28 09:40:53 -08:00
2024-11-15 20:36:27 -08:00
2024-12-02 11:34:44 -08:00
2024-12-01 15:12:43 -08:00
2024-12-02 11:34:44 -08:00
2024-11-29 11:43:29 -08:00
2024-12-01 15:12:43 -08:00
2024-12-04 13:22:59 -05:00
2024-11-30 14:45:29 -08:00
2024-12-01 15:12:43 -08:00
2024-11-21 08:28:08 -08:00
2024-12-02 11:34:44 -08:00
2024-12-06 11:36:48 -08:00
2024-12-01 15:12:43 -08:00
2024-12-02 11:34:44 -08:00
2024-12-02 12:36:18 -05:00
2024-11-12 15:48:08 +01:00
2024-12-01 15:12:43 -08:00
2024-12-02 11:34:44 -08:00
2024-11-29 11:19:31 -08:00
2024-12-03 08:22:25 -08:00
2024-12-04 13:22:59 -05:00
2024-12-01 15:12:43 -08:00
2024-12-03 08:22:25 -08:00
2024-11-12 18:05:05 -05:00
2024-12-02 11:34:44 -08:00
2024-11-11 10:56:27 -08:00
2024-12-02 11:34:44 -08:00
2024-12-06 13:47:55 -08:00
2024-12-02 11:34:44 -08:00
2024-12-01 15:12:43 -08:00
2024-12-05 10:03:43 -08:00
2024-12-02 11:34:44 -08:00