diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py b/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py index 04d9679d1978..ddaa60d2860e 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py @@ -494,6 +494,9 @@ def _read_eeprom(self, offset, num_bytes, log_on_error=True): else: result += content read_length = len(content) + if read_length == 0: + logger.log_error(f'SFP {self.sdk_index}: EEPROM page {page} is empty, no data retrieved') + return None num_bytes -= read_length if num_bytes > 0: page_size = f.seek(0, os.SEEK_END)