diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index 4312a12724df..314a782d9393 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -3677,7 +3677,7 @@ QDF_STATUS wma_send_peer_assoc_req(struct bss_params *add_bss) OL_TXRX_PEER_STATE_CONN); status = wma_set_cdp_vdev_pause_reason(wma, vdev_id); if (QDF_IS_STATUS_ERROR(status)) - goto peer_cleanup; + goto send_resp; } wmi_unified_send_txbf(wma, &add_bss->staContext); @@ -3698,7 +3698,7 @@ QDF_STATUS wma_send_peer_assoc_req(struct bss_params *add_bss) &add_bss->staContext); if (QDF_IS_STATUS_ERROR(status)) { wma_err("Failed to send peer assoc status:%d", status); - goto peer_cleanup; + goto send_resp; } /* we just had peer assoc, so install key will be done later */ @@ -3719,7 +3719,7 @@ QDF_STATUS wma_send_peer_assoc_req(struct bss_params *add_bss) if (!mlme_obj) { wma_err("Failed to mlme obj"); status = QDF_STATUS_E_FAILURE; - goto peer_cleanup; + goto send_resp; } /* * Store the bssid in interface table, bssid will @@ -3743,14 +3743,11 @@ QDF_STATUS wma_send_peer_assoc_req(struct bss_params *add_bss) wma_err("Failed to allocate request for vdev_id %d", vdev_id); wma_remove_req(wma, vdev_id, WMA_PEER_ASSOC_CNF_START); status = QDF_STATUS_E_FAILURE; - goto peer_cleanup; + goto send_resp; } return QDF_STATUS_SUCCESS; -peer_cleanup: - if (peer_exist) - wma_remove_peer(wma, add_bss->bssId, vdev_id, false); send_resp: wma_send_add_bss_resp(wma, vdev_id, status);