[mac] assert on failure of otPlatRadioEnable() (#3592)

This commit is contained in:
Abtin Keshavarzian
2019-02-15 09:20:15 -08:00
committed by Jonathan Hui
parent b08fab42bb
commit e02c970269
+2 -2
View File
@@ -135,11 +135,11 @@ otError SubMac::Enable(void)
VerifyOrExit(mState == kStateDisabled);
SuccessOrExit(error = otPlatRadioEnable(&GetInstance()));
error = otPlatRadioSleep(&GetInstance());
assert(error == OT_ERROR_NONE);
SuccessOrExit(error = otPlatRadioSleep(&GetInstance()));
SetState(kStateSleep);
exit:
assert(error == OT_ERROR_NONE);
return error;
}