xiaoxiang781216 commented on code in PR #11396: URL: https://github.com/apache/nuttx/pull/11396#discussion_r1427672639
########## arch/xtensa/src/esp32s3/esp32s3_wlan.c: ########## @@ -1452,27 +1452,18 @@ static void wlan_softap_tx_done(uint8_t *data, uint16_t *len, bool status) #ifdef ESP32S3_WLAN_HAS_STA int esp32s3_wlan_sta_set_linkstatus(bool linkstatus) { - int ret = -EINVAL; struct wlan_priv_s *priv = &g_wlan_priv[ESP32S3_WLAN_STA_DEVNO]; - if (priv != NULL) + if (linkstatus == true) Review Comment: why remov the null check? ########## arch/risc-v/src/esp32c3/esp32c3_wlan.c: ########## @@ -1462,27 +1462,18 @@ static void wlan_softap_tx_done(uint8_t *data, uint16_t *len, bool status) #ifdef ESP32C3_WLAN_HAS_STA int esp32c3_wlan_sta_set_linkstatus(bool linkstatus) { - int ret = -EINVAL; struct wlan_priv_s *priv = &g_wlan_priv[ESP32C3_WLAN_STA_DEVNO]; - if (priv != NULL) Review Comment: ditto -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org