Commit 2598d9b4 authored by Lucas De Marchi's avatar Lucas De Marchi
Browse files

drm/xe/psmi: Do not return NULL



The checks for id and bo_size are impossible conditions. If they were
possible, then the caller should not be using IS_ERR(). Just replace
them with asserts which should be compiled out when not debugging and
at the same time prevent other refactors to break this assumption.

Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/aK1nZjyAF0s7bnHg@stanley.mountain


Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/20250922221133.109921-2-lucas.demarchi@intel.com


Signed-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
parent f73f6dd3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -70,8 +70,8 @@ static struct xe_bo *psmi_alloc_object(struct xe_device *xe,
{
	struct xe_tile *tile;

	if (!id || !bo_size)
		return NULL;
	xe_assert(xe, id);
	xe_assert(xe, bo_size);

	tile = &xe->tiles[id - 1];