Commit f17cc0f
drm/i915/gt: Prevent error pointer dereference
Move the check for "if (IS_ERR(obj))" in front of the call to
i915_gem_object_set_cache_coherency() which dereferences "obj".
Otherwise it will lead to a crash.
Fixes: 43aa755 ("drm/i915/mtl: Update cache coherency setting for context structure")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/455b2279-2e08-4d00-9784-be56d8ee42e3@moroto.mountain
(cherry picked from commit c92ec50)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>1 parent ce9ecca commit f17cc0f
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1094 | 1094 | | |
1095 | 1095 | | |
1096 | 1096 | | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
1097 | 1100 | | |
1098 | 1101 | | |
1099 | 1102 | | |
| |||
1102 | 1105 | | |
1103 | 1106 | | |
1104 | 1107 | | |
1105 | | - | |
1106 | | - | |
1107 | 1108 | | |
1108 | 1109 | | |
1109 | 1110 | | |
| |||
0 commit comments