diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py b/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py index 1a0245b79e62..e8f48bbe54aa 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py @@ -553,6 +553,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)