From: jsg Date: Thu, 14 Dec 2023 05:33:28 +0000 (+0000) Subject: drm/amdgpu: Return from switch early for EEPROM I2C address X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c092a4e260a73a4280bde159a90d4119405e3a82;p=openbsd 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 --- 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