diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2023-12-14 05:33:29 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2023-12-14 05:33:29 +0000 |
commit | e98356d6dca11ffbc3809574f9f34c741933c866 (patch) | |
tree | 28d3e151b43347e88eea6cd506d44c1b85c36be0 /sys/dev | |
parent | ce4ba7163111c4f1abd3666677aeaa914fa56d89 (diff) |
drm/amdgpu: Return from switch early for EEPROM I2C address
From Luben Tuikov
af6b1f1156fc2d886251a076b87243597301437c in linux-6.1.y/6.1.68
8782007b5f5795f118c5167f46d8c8142abcc92f in mainline linux
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_ras_eeprom.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_ras_eeprom.c index aeebae67fd8..2c2c8451a85 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_ras_eeprom.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_ras_eeprom.c @@ -185,14 +185,14 @@ static bool __get_eeprom_i2c_addr(struct amdgpu_device *adev, switch (adev->asic_type) { case CHIP_VEGA20: control->i2c_address = EEPROM_I2C_MADDR_0; - break; + return true; case CHIP_ARCTURUS: return __get_eeprom_i2c_addr_arct(adev, control); case CHIP_SIENNA_CICHLID: control->i2c_address = EEPROM_I2C_MADDR_0; - break; + return true; case CHIP_ALDEBARAN: #ifdef notyet @@ -205,7 +205,7 @@ static bool __get_eeprom_i2c_addr(struct amdgpu_device *adev, STUB(); control->i2c_address = EEPROM_I2C_MADDR_0; #endif - break; + return true; case CHIP_IP_DISCOVERY: return __get_eeprom_i2c_addr_ip_discovery(adev, control); @@ -213,8 +213,6 @@ static bool __get_eeprom_i2c_addr(struct amdgpu_device *adev, default: return false; } - - return true; } static void |