From 352379672240dff996e60e074e1ba49eea92755b Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Tue, 22 Aug 2017 18:41:22 -0700 Subject: [PATCH] [mac] update the log message for otPlatRadioSleep() failure (#2123) --- src/core/mac/mac.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/core/mac/mac.cpp b/src/core/mac/mac.cpp index ba15b8456..37775cf07 100644 --- a/src/core/mac/mac.cpp +++ b/src/core/mac/mac.cpp @@ -1155,15 +1155,12 @@ otError Mac::RadioSleep(void) #endif - SuccessOrExit(error = otPlatRadioSleep(&GetInstance())); + error = otPlatRadioSleep(&GetInstance()); + VerifyOrExit(error != OT_ERROR_NONE); + + otLogWarnMac(GetInstance(), "otPlatRadioSleep() failed with error %s", otThreadErrorToString(error)); exit: - - if (error != OT_ERROR_NONE) - { - otLogWarnMac(GetInstance(), "otPlatRadioSleep() failed with error %s", otThreadErrorToString(error)); - } - return error; }