[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 <yfastiuk@nvidia.com>
This commit is contained in:
Yevhen Fastiuk 2024-02-05 19:41:16 +02:00 committed by GitHub
parent 0aacc1f28e
commit 2f35079979
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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: