drm/amdgpu: Fix the warning division or modulo by zero

[ Upstream commit 1a00f2ac82 ]

Checks the partition mode and returns an error for an invalid mode.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Suggested-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@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-10 17:32:53 +08:00 • committed by Greg Kroah-Hartman
commit d116bb921e