diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 356b5bace489ba..b14c75d86670ae 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -301,8 +301,8 @@ CHIP_ERROR DeviceController::Shutdown() // ReturnErrorOnFailure(DeviceLayer::PlatformMgr().Shutdown()); #else - mInetLayer->Shutdown(); - mSystemLayer->Shutdown(); + VerifyOrReturnError(mInetLayer->Shutdown() == INET_NO_ERROR, CHIP_ERROR_INTERNAL); + VerifyOrReturnError(mSystemLayer->Shutdown() == CHIP_SYSTEM_NO_ERROR, CHIP_ERROR_INTERNAL); chip::Platform::Delete(mInetLayer); chip::Platform::Delete(mSystemLayer); #endif // CONFIG_DEVICE_LAYER