From 491cf9a3f878ec72108c1f34cc16b8c97129284f Mon Sep 17 00:00:00 2001 From: Yevhen Fastiuk Date: Mon, 5 Feb 2024 19:41:16 +0200 Subject: [PATCH] [Mellanox] Fix uninitialized variable on module plug event (#17011) - Why I did it To fix uninitialized variable - How I did it Add initial value Signed-off-by: Yevhen Fastiuk --- .../mellanox/mlnx-platform-api/sonic_platform/sfp_event.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/sfp_event.py b/platform/mellanox/mlnx-platform-api/sonic_platform/sfp_event.py index c390e9a4d3..1330010204 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/sfp_event.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/sfp_event.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2019-2022 NVIDIA CORPORATION & AFFILIATES. +# Copyright (c) 2019-2024 NVIDIA CORPORATION & AFFILIATES. # Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -336,6 +336,7 @@ class sfp_event: uint32_t_p_assign(port_cnt_p, 0) label_port_list = [] module_state = 0 + error_type = pmpe_t.error_type rc = sx_lib_host_ifc_recv(fd_p, pkt, pkt_size_p, recv_info_p) if rc != 0: