drm/amdgpu: fix dereference null return value for the function amdgpu_vm_pt_parent

[ Upstream commit 511a623fb4 ]

The pointer parent may be NULLed by the function amdgpu_vm_pt_parent.
To make the code more robust, check the pointer parent.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Suggested-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Jesse Zhang 2024-05-23 17:14:45 +08:00 • committed by Greg Kroah-Hartman
commit 3cc03d1dbd