From dfd3749142ad102202926874b85c20af76fa2246 Mon Sep 17 00:00:00 2001 From: Martin Girardot <165289184+Martin-NXP@users.noreply.github.com> Date: Tue, 12 Nov 2024 19:56:05 +0100 Subject: [PATCH] [NXP][platform][common] Fix return status when removed a non-existing network ID (#36435) Signed-off-by: Martin Girardot --- src/platform/nxp/common/NetworkCommissioningWiFiDriver.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/platform/nxp/common/NetworkCommissioningWiFiDriver.cpp b/src/platform/nxp/common/NetworkCommissioningWiFiDriver.cpp index f1f35937d8b24e..ca93f091cf9661 100644 --- a/src/platform/nxp/common/NetworkCommissioningWiFiDriver.cpp +++ b/src/platform/nxp/common/NetworkCommissioningWiFiDriver.cpp @@ -144,6 +144,8 @@ Status NXPWiFiDriver::RemoveNetwork(ByteSpan networkId, MutableCharSpan & outDeb { outDebugText.reduce_size(0); outNetworkIndex = 0; + VerifyOrReturnError(NetworkMatch(mStagingNetwork, networkId), Status::kNetworkIDNotFound); + // Use empty ssid for representing invalid network mStagingNetwork.ssidLen = 0;