drm/amdgpu: Return from switch early for EEPROM I2C address
authorLuben Tuikov <luben.tuikov@amd.com>
Thu, 23 Mar 2023 05:46:41 +0000 (01:46 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Dec 2023 17:39:26 +0000 (18:39 +0100)
commitaf6b1f1156fc2d886251a076b87243597301437c
treeeb2af2578cd511ccff17def665b2e63f28f51bab
parenta3049c9a30131639f056a2b3db934c70ff91068a
drm/amdgpu: Return from switch early for EEPROM I2C address

[ Upstream commit 8782007b5f5795f118c5167f46d8c8142abcc92f ]

As soon as control->i2c_address is set, return; remove the "break;" from the
switch--it is unnecessary. This mimics what happens when for some cases in the
switch, we call helper functions with "return <helper function>".

Remove final function "return true;" to indicate that the switch is final and
terminal, and that there should be no code after the switch.

Cc: Candice Li <candice.li@amd.com>
Cc: Kent Russell <kent.russell@amd.com>
Cc: Alex Deucher <Alexander.Deucher@amd.com>
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Reviewed-by: Alex Deucher <Alexander.Deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Stable-dep-of: e0409021e34a ("drm/amdgpu: Update EEPROM I2C address for smu v13_0_0")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c