]> Gentwo Git Trees - linux/.git/commit
drm/xe: Add NULL checks to scratch LRC allocation
authorMatthew Brost <matthew.brost@intel.com>
Wed, 8 Oct 2025 21:44:59 +0000 (14:44 -0700)
committerMatthew Brost <matthew.brost@intel.com>
Thu, 9 Oct 2025 10:22:15 +0000 (03:22 -0700)
commitb0607599b7d1a8372b6dcd790d52bd1aefe59845
treeb2bdb6c8fa87f83e6031420f86b1625ed1bd06d8
parent15b3036045188f4da4ca62b2ed01b0f160252e9b
drm/xe: Add NULL checks to scratch LRC allocation

kmalloc can fail, the returned value must have a NULL check. This should
be immediately after kmalloc for clarity.

v5:
 - Assert state->buffer in setup_bo if buffer is iomem (Tomasz)

Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Tomasz Lis <tomasz.lis@intel.com>
Link: https://lore.kernel.org/r/20251008214532.3442967-2-matthew.brost@intel.com
drivers/gpu/drm/xe/xe_lrc.c