diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 1b615a7122d817..82c782b8781267 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -299,8 +299,8 @@ CHIP_ERROR DeviceController::Shutdown() // great at all. 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