Skip to content

Commit aeda7f7

Browse files
Merge pull request #5069 from deepikabhavnani/assert_added
Changed error print to assert
2 parents 4e46aa9 + 65150b6 commit aeda7f7

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

targets/TARGET_Realtek/TARGET_AMEBA/rtw_emac.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,7 @@ emac_interface_t *wlan_emac_init_interface()
218218

219219
if (_emac == NULL) {
220220
_emac = (emac_interface_t*) malloc(sizeof(emac_interface_t));
221-
if (_emac == NULL) {//new emac_interface_t fail
222-
printf("emac initialization failed\r\n");
223-
return NULL;
224-
}
221+
MBED_ASSERT(_emac);
225222
_emac->hw = NULL;
226223
memcpy((void*)&_emac->ops, &wlan_emac_interface, sizeof(wlan_emac_interface));
227224
}

0 commit comments

Comments
 (0)