diff --git a/orchagent/portsorch.cpp b/orchagent/portsorch.cpp index fd6a6683c9..3ad13bfbf1 100644 --- a/orchagent/portsorch.cpp +++ b/orchagent/portsorch.cpp @@ -3533,6 +3533,11 @@ bool PortsOrch::initPorts(const std::vector &portConfigs) ports.push_back(p); } + if (ports.empty()) + { + return status; + } + SWSS_LOG_TIMER(__FUNCTION__); if (!initializePorts(ports)) @@ -3558,6 +3563,8 @@ bool PortsOrch::initPorts(const std::vector &portConfigs) void PortsOrch::postInitPort(Port &p) { + SWSS_LOG_ENTER(); + const auto &alias = p.m_alias; const auto &role = p.m_role; const auto &index = p.m_index;