Quoting Dan Carpenter (2019-08-27 10:40:16)
> Hello Chris Wilson,
>
> The patch 75b974a859e5: "drm/i915/selftests: Teach igt_gpu_fill_dw()
> to take intel_context" from Aug 24, 2019, leads to the following
> static checker warning:
>
> drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c:402
> igt_ctx_exec()
> error: 'ce' dereferencing possible ERR_PTR()
>
> drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
> 388 dw = 0;
> 389 while (!time_after(jiffies, end_time)) {
> 390 struct i915_gem_context *ctx;
> 391 struct intel_context *ce;
> 392
> 393 ctx = live_context(i915, file);
> 394 if (IS_ERR(ctx)) {
> 395 err = PTR_ERR(ctx);
> 396 goto out_unlock;
> 397 }
> 398
> 399 ce = i915_gem_context_get_engine(ctx,
> engine->legacy_idx);
>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> New assignment. Smatch thinks it can be ERR_PTR(-EINVAL)
It can't be from successful construction of the live_context().
GEM_BUG_ON(IS_ERR(ce)) I guess.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx