[Intel-gfx] [PATCH] Fixes KW issues for NULL pointer dereference
Andrzej Hajda
andrzej.hajda at intel.com
Thu Aug 11 16:40:53 UTC 2022
On 11.08.2022 13:28, Tapas Rana wrote:
I guess even for trivial patches rules should be followed - subject
should describe what has changed, commit message should describe why.
> ---
> drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c
> index 9a7e50534b84..0bbf44c34cff 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c
> @@ -435,6 +435,9 @@ i915_ttm_memcpy_work_arm(struct i915_ttm_memcpy_work *work,
> static bool i915_ttm_memcpy_allowed(struct ttm_buffer_object *bo,
> struct ttm_resource *dst_mem)
> {
> + if(!bo)
> + return NULL;
I guess it should be "return false"
Regards
Andrzej
> +
> if (i915_gem_object_needs_ccs_pages(i915_ttm_to_gem(bo)))
> return false;
>
More information about the Intel-gfx
mailing list