Browse Source

qcacld-3.0: wma: Remove logs for cds_get_context() checks

cds_get_context() function already takes care of logging the
caller function name in case of any error.
Hence there is no need to add the error log again.
Getting rid of these unnecessary logs reduces driver memory footprint.

CRs-Fixed: 2815522
Change-Id: Ibb17fb043d6addaf0fa86aeb882178ef27535162
Srinivas Girigowda 4 years ago
parent
commit
27d9cc4eec

+ 5 - 15
core/wma/inc/wma.h

@@ -1816,10 +1816,8 @@ void wma_vdev_update_pause_bitmap(uint8_t vdev_id, uint16_t value)
 	tp_wma_handle wma = (tp_wma_handle)cds_get_context(QDF_MODULE_ID_WMA);
 	struct wma_txrx_node *iface;
 
-	if (!wma) {
-		wma_err("WMA context is invald!");
+	if (!wma)
 		return;
-	}
 
 	if (vdev_id >= wma->max_bssid) {
 		wma_err("Invalid vdev_id: %d", vdev_id);
@@ -1848,10 +1846,8 @@ uint16_t wma_vdev_get_pause_bitmap(uint8_t vdev_id)
 	tp_wma_handle wma = (tp_wma_handle)cds_get_context(QDF_MODULE_ID_WMA);
 	struct wma_txrx_node *iface;
 
-	if (!wma) {
-		wma_err("WMA context is invald!");
+	if (!wma)
 		return 0;
-	}
 
 	iface = &wma->interfaces[vdev_id];
 
@@ -1874,10 +1870,8 @@ static inline bool wma_vdev_is_device_in_low_pwr_mode(uint8_t vdev_id)
 	tp_wma_handle wma = (tp_wma_handle)cds_get_context(QDF_MODULE_ID_WMA);
 	struct wma_txrx_node *iface;
 
-	if (!wma) {
-		wma_err("WMA context is invalid!");
+	if (!wma)
 		return 0;
-	}
 
 	iface = &wma->interfaces[vdev_id];
 
@@ -1992,10 +1986,8 @@ void wma_vdev_set_pause_bit(uint8_t vdev_id, wmi_tx_pause_type bit_pos)
 	tp_wma_handle wma = (tp_wma_handle)cds_get_context(QDF_MODULE_ID_WMA);
 	struct wma_txrx_node *iface;
 
-	if (!wma) {
-		wma_err("WMA context is invalid!");
+	if (!wma)
 		return;
-	}
 
 	iface = &wma->interfaces[vdev_id];
 
@@ -2020,10 +2012,8 @@ void wma_vdev_clear_pause_bit(uint8_t vdev_id, wmi_tx_pause_type bit_pos)
 	tp_wma_handle wma = (tp_wma_handle)cds_get_context(QDF_MODULE_ID_WMA);
 	struct wma_txrx_node *iface;
 
-	if (!wma) {
-		wma_err("WMA context is invalid!");
+	if (!wma)
 		return;
-	}
 
 	iface = &wma->interfaces[vdev_id];
 

+ 0 - 1
core/wma/src/wlan_qct_wma_legacy.c

@@ -113,7 +113,6 @@ QDF_STATUS umac_send_mb_message_to_mac(void *msg)
 	void *mac_handle = cds_get_context(QDF_MODULE_ID_SME);
 
 	if (!mac_handle) {
-		QDF_TRACE_ERROR(QDF_MODULE_ID_SYS, "Invalid MAC handle");
 		qdf_mem_free(msg);
 		return QDF_STATUS_E_FAILURE;
 	}

+ 4 - 13
core/wma/src/wma_data.c

@@ -1416,10 +1416,8 @@ QDF_STATUS wma_tx_detach(tp_wma_handle wma_handle)
 	/* Get the txRx Pdev ID */
 	uint8_t pdev_id = WMI_PDEV_ID_SOC;
 
-	if (!soc) {
-		wma_err("SOC context is NULL");
+	if (!soc)
 		return QDF_STATUS_E_FAILURE;
-	}
 
 	if (pdev_id != OL_TXRX_INVALID_PDEV_ID) {
 		/* Deregister with TxRx for Tx Mgmt completion call back */
@@ -1516,10 +1514,8 @@ int wma_mcc_vdev_tx_pause_evt_handler(void *handle, uint8_t *event,
 		return 0;
 	}
 
-	if (!soc) {
-		wma_err("SOC context is NULL");
+	if (!soc)
 		return -EINVAL;
-	}
 
 	wmi_event = param_buf->fixed_param;
 	vdev_map = wmi_event->vdev_map;
@@ -2260,7 +2256,6 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen,
 	iface = &wma_handle->interfaces[vdev_id];
 
 	if (!soc) {
-		wma_err("SOC context is NULL");
 		cds_packet_free((void *)tx_frame);
 		return QDF_STATUS_E_FAILURE;
 	}
@@ -2964,10 +2959,8 @@ void wma_delete_invalid_peer_entries(uint8_t vdev_id, uint8_t *peer_mac_addr)
 	uint8_t i;
 	struct wma_txrx_node *iface;
 
-	if (!wma) {
-		wma_err("wma handle is NULL");
+	if (!wma)
 		return;
-	}
 
 	iface = &wma->interfaces[vdev_id];
 
@@ -3000,10 +2993,8 @@ uint8_t wma_rx_invalid_peer_ind(uint8_t vdev_id, void *wh)
 	bool invalid_peer_found = false;
 	struct wma_txrx_node *iface;
 
-	if (!wma) {
-		wma_err("wma handle is NULL");
+	if (!wma)
 		return -EINVAL;
-	}
 
 	iface = &wma->interfaces[vdev_id];
 	rx_inv_msg = qdf_mem_malloc(sizeof(struct ol_rx_inv_peer_params));

+ 30 - 93
core/wma/src/wma_dev_if.c

@@ -376,11 +376,8 @@ QDF_STATUS wma_vdev_detach_callback(struct vdev_delete_response *rsp)
 	struct wma_txrx_node *iface = NULL;
 
 	wma = cds_get_context(QDF_MODULE_ID_WMA);
-
-	if (!wma) {
-		wma_err("wma handle is NULL for VDEV_%d", rsp->vdev_id);
+	if (!wma)
 		return QDF_STATUS_E_FAILURE;
-	}
 
 	/* Sanitize the vdev id*/
 	if (rsp->vdev_id > wma->max_bssid) {
@@ -488,7 +485,6 @@ static QDF_STATUS wma_handle_vdev_detach(tp_wma_handle wma_handle,
 	int i;
 
 	if (!soc) {
-		wma_err("SOC context is NULL");
 		status = QDF_STATUS_E_FAILURE;
 		goto rel_ref;
 	}
@@ -905,11 +901,8 @@ static void wma_peer_send_phymode(struct wlan_objmgr_vdev *vdev,
 		return;
 
 	wma = cds_get_context(QDF_MODULE_ID_WMA);
-
-	if(!wma) {
-		wma_err("wma handle NULL");
+	if(!wma)
 		return;
-	}
 
 	old_peer_phymode = wlan_peer_get_phymode(peer);
 	vdev_chan = wlan_vdev_mlme_get_des_chan(vdev);
@@ -1166,10 +1159,9 @@ QDF_STATUS wma_vdev_start_resp_handler(struct vdev_mlme_obj *vdev_mlme,
 	struct config_ratemask_params rparams = {0};
 
 	wma = cds_get_context(QDF_MODULE_ID_WMA);
-	if (!wma) {
-		wma_err("wma wma is NULL for VDEV_%d", rsp->vdev_id);
+	if (!wma)
 		return QDF_STATUS_E_FAILURE;
-	}
+
 	psoc = wma->psoc;
 	if (!psoc) {
 		wma_err("psoc is NULL");
@@ -1334,10 +1326,8 @@ bool wma_is_vdev_valid(uint32_t vdev_id)
 {
 	tp_wma_handle wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
 
-	if (!wma_handle) {
-		wma_debug("vdev_id: %d, null wma_handle", vdev_id);
+	if (!wma_handle)
 		return false;
-	}
 
 	/* No of interface are allocated based on max_bssid value */
 	if (vdev_id >= wma_handle->max_bssid) {
@@ -1469,11 +1459,10 @@ QDF_STATUS wma_peer_unmap_conf_cb(uint8_t vdev_id,
 	tp_wma_handle wma = cds_get_context(QDF_MODULE_ID_WMA);
 	QDF_STATUS qdf_status;
 
-	if (!wma) {
-		wma_err("peer_id_cnt: %d, null wma_handle", peer_id_cnt);
+	if (!wma)
 		return QDF_STATUS_E_INVAL;
-	}
 
+	wma_debug("peer_id_cnt: %d", peer_id_cnt);
 	qdf_status = wmi_unified_peer_unmap_conf_send(
 						wma->wmi_handle,
 						vdev_id, peer_id_cnt,
@@ -1487,10 +1476,8 @@ QDF_STATUS wma_peer_unmap_conf_cb(uint8_t vdev_id,
 
 		wma_debug("post unmap_conf cmd to MC thread");
 
-		if (!mac_ctx) {
-			wma_err("mac_ctx is NULL");
+		if (!mac_ctx)
 			return QDF_STATUS_E_FAILURE;
-		}
 
 		peer_unmap_conf_req = qdf_mem_malloc(sizeof(
 					struct send_peer_unmap_conf_params));
@@ -1577,7 +1564,6 @@ QDF_STATUS wma_remove_peer(tp_wma_handle wma, uint8_t *mac_addr,
 	}
 
 	if (!soc) {
-		wma_err("SOC context is NULL");
 		QDF_BUG(0);
 		return QDF_STATUS_E_INVAL;
 	}
@@ -1811,10 +1797,8 @@ QDF_STATUS wma_create_peer(tp_wma_handle wma,
 		goto err;
 	}
 
-	if (!dp_soc) {
-		wma_err("DP SOC context is NULL");
+	if (!dp_soc)
 		goto err;
-	}
 
 	if (qdf_is_macaddr_group((struct qdf_mac_addr *)peer_addr) ||
 	    qdf_is_macaddr_zero((struct qdf_mac_addr *)peer_addr)) {
@@ -2025,10 +2009,9 @@ wma_check_and_find_mcc_ap(tp_wma_handle wma, uint8_t vdev_id)
 {
 	struct mac_context *mac_ctx = cds_get_context(QDF_MODULE_ID_PE);
 
-	if (!mac_ctx) {
-		wma_err("Failed to get mac_ctx");
+	if (!mac_ctx)
 		return;
-	}
+
 	if (mac_ctx->sap.sap_channel_avoidance)
 		wma_find_mcc_ap(wma, vdev_id, false);
 }
@@ -2162,10 +2145,8 @@ __wma_handle_vdev_stop_rsp(struct vdev_stop_response *resp_event)
 	uint32_t vdev_stop_type;
 	struct del_bss_resp *vdev_stop_resp;
 
-	if (!wma) {
-		wma_err("wma is null");
+	if (!wma)
 		return QDF_STATUS_E_INVAL;
-	}
 
 	/* Ignore stop_response in Monitor mode */
 	if (cds_get_conparam() == QDF_GLOBAL_MONITOR_MODE)
@@ -2275,10 +2256,8 @@ QDF_STATUS wma_vdev_stop_resp_handler(struct vdev_mlme_obj *vdev_mlme,
 	QDF_STATUS status = QDF_STATUS_E_FAILURE;
 
 	wma = cds_get_context(QDF_MODULE_ID_WMA);
-	if (!wma) {
-		wma_err("wma handle is NULL for VDEV_%d", rsp->vdev_id);
+	if (!wma)
 		return status;
-	}
 
 	iface = &wma->interfaces[vdev_mlme->vdev->vdev_objmgr.vdev_id];
 
@@ -2299,16 +2278,12 @@ void wma_cleanup_vdev(struct wlan_objmgr_vdev *vdev)
 	uint8_t vdev_id = wlan_vdev_get_id(vdev);
 	struct vdev_mlme_obj *vdev_mlme;
 
-	if (!soc) {
-		wma_err("SOC handle is NULL");
+	if (!soc)
 		return;
-	}
 
 	wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
-	if (!wma_handle) {
-		wma_err("WMA context is invalid");
+	if (!wma_handle)
 		return;
-	}
 
 	if (!wma_handle->interfaces[vdev_id].vdev) {
 		wma_err("vdev is NULL");
@@ -2335,10 +2310,8 @@ QDF_STATUS wma_vdev_self_peer_create(struct vdev_mlme_obj *vdev_mlme)
 	tp_wma_handle wma_handle;
 
 	wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
-	if (!wma_handle) {
-		wma_err("WMA context is invalid");
+	if (!wma_handle)
 		return QDF_STATUS_E_FAILURE;
-	}
 
 	if (mlme_vdev_uses_self_peer(vdev_mlme->mgmt.generic.type,
 				     vdev_mlme->mgmt.generic.subtype)) {
@@ -2377,21 +2350,12 @@ QDF_STATUS wma_post_vdev_create_setup(struct wlan_objmgr_vdev *vdev)
 	tp_wma_handle wma_handle;
 	uint8_t amsdu_val;
 
-	if (!mac) {
-		wma_err("Failed to get mac");
+	if (!mac)
 		return QDF_STATUS_E_FAILURE;
-	}
 
 	wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
-	if (!wma_handle) {
-		wma_err("WMA context is invalid");
+	if (!wma_handle || !soc)
 		return QDF_STATUS_E_FAILURE;
-	}
-
-	if (!soc) {
-		wma_err("SOC context is invalid");
-		return QDF_STATUS_E_FAILURE;
-	}
 
 	if (wlan_objmgr_vdev_try_get_ref(vdev, WLAN_LEGACY_WMA_ID) !=
 		QDF_STATUS_SUCCESS)
@@ -2676,14 +2640,9 @@ QDF_STATUS wma_vdev_pre_start(uint8_t vdev_id, bool restart)
 	QDF_STATUS status;
 	uint8_t btc_chain_mode;
 
-	if (!wma) {
-		wma_err("Invalid wma handle");
-		return QDF_STATUS_E_FAILURE;
-	}
-	if (!mac_ctx) {
-		wma_err("Invalid mac context");
+	if (!wma || !mac_ctx)
 		return QDF_STATUS_E_FAILURE;
-	}
+
 	intr = wma->interfaces;
 	if (!intr) {
 		wma_err("Invalid interface");
@@ -2979,10 +2938,8 @@ void wma_hold_req_timer(void *data)
 	QDF_STATUS status;
 
 	wma = cds_get_context(QDF_MODULE_ID_WMA);
-	if (!wma) {
-		wma_err("Failed to get wma");
+	if (!wma)
 		return;
-	}
 
 	status = wma_find_req_on_timer_expiry(wma, tgt_req);
 
@@ -3328,14 +3285,9 @@ QDF_STATUS wma_pre_vdev_start_setup(uint8_t vdev_id,
 	struct vdev_mlme_obj *mlme_obj;
 	uint8_t *mac_addr;
 
-	if (!soc) {
-		wma_err("Invalid soc");
-		return QDF_STATUS_E_FAILURE;
-	}
-	if (!wma) {
-		wma_err("Invalid wma handle");
+	if (!soc || !wma)
 		return QDF_STATUS_E_FAILURE;
-	}
+
 	iface = &wma->interfaces[vdev_id];
 
 	mlme_obj = wlan_vdev_mlme_get_cmpt_obj(iface->vdev);
@@ -3380,10 +3332,9 @@ QDF_STATUS wma_post_vdev_start_setup(uint8_t vdev_id)
 	struct wlan_objmgr_vdev *vdev;
 	uint8_t bss_power;
 
-	if (!wma) {
-		wma_err("Invalid wma handle");
+	if (!wma)
 		return QDF_STATUS_E_FAILURE;
-	}
+
 	intr = &wma->interfaces[vdev_id];
 	if (!intr) {
 		wma_err("Invalid interface");
@@ -3498,10 +3449,8 @@ QDF_STATUS wma_pre_assoc_req(struct bss_params *add_bss)
 	tp_wma_handle wma;
 
 	wma = cds_get_context(QDF_MODULE_ID_WMA);
-	if (!wma) {
-		wma_err("Invalid wma");
+	if (!wma)
 		return QDF_STATUS_E_INVAL;
-	}
 
 	status = wma_update_iface_params(wma, add_bss);
 	if (QDF_IS_STATUS_ERROR(status))
@@ -3640,14 +3589,8 @@ QDF_STATUS wma_send_peer_assoc_req(struct bss_params *add_bss)
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
 
 	wma = cds_get_context(QDF_MODULE_ID_WMA);
-	if (!wma) {
-		wma_err("Invalid wma");
+	if (!wma || !mac || !soc)
 		return QDF_STATUS_E_INVAL;
-	}
-	if (!mac) {
-		wma_err("Invalid mac context");
-		return QDF_STATUS_E_INVAL;
-	}
 
 	vdev_id = add_bss->staContext.smesessionId;
 
@@ -4984,10 +4927,8 @@ static void wma_vdev_reset_beacon_interval_timer(void *data)
 	uint8_t vdev_id = req->vdev_id;
 
 	wma = (tp_wma_handle)cds_get_context(QDF_MODULE_ID_WMA);
-	if (!wma) {
-		wma_err("Failed to get wma");
+	if (!wma)
 		goto end;
-	}
 
 	/* Change the beacon interval back to its original value */
 	wma_debug("Change beacon interval back to %d", beacon_interval);
@@ -5042,10 +4983,8 @@ QDF_STATUS wma_add_bss_peer_sta(uint8_t vdev_id, uint8_t *bssid)
 	QDF_STATUS status = QDF_STATUS_E_FAILURE;
 
 	wma = cds_get_context(QDF_MODULE_ID_WMA);
-	if (!wma) {
-		wma_err("Invalid wma");
+	if (!wma)
 		goto err;
-	}
 
 	status = wma_create_peer(wma, bssid, WMI_PEER_TYPE_DEFAULT, vdev_id);
 err:
@@ -5059,10 +4998,8 @@ QDF_STATUS wma_send_vdev_stop(uint8_t vdev_id)
 	QDF_STATUS status;
 
 	wma = cds_get_context(QDF_MODULE_ID_WMA);
-	if (!wma) {
-		wma_err("Invalid wma");
+	if (!wma)
 		return QDF_STATUS_E_FAILURE;
-	}
 
 	wma_debug("vdev_id: %d, pausing tx_ll_queue for VDEV_STOP", vdev_id);
 	cdp_fc_vdev_pause(soc, vdev_id,

+ 16 - 41
core/wma/src/wma_features.c

@@ -205,11 +205,8 @@ QDF_STATUS wma_get_snr(tAniGetSnrReq *psnr_req)
 	struct wma_txrx_node *intr;
 
 	wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
-
-	if (!wma_handle) {
-		wma_err("Failed to get wma_handle");
+	if (!wma_handle)
 		return QDF_STATUS_E_FAULT;
-	}
 
 	intr = &wma_handle->interfaces[psnr_req->sessionId];
 	/* command is in progress */
@@ -559,10 +556,8 @@ enum wlan_phymode wma_chan_phy_mode(uint32_t freq, enum phy_ch_width chan_width,
 	uint16_t bw_val = wlan_reg_get_bw_value(chan_width);
 	t_wma_handle *wma = cds_get_context(QDF_MODULE_ID_WMA);
 
-	if (!wma) {
-		wma_err("wma_handle is NULL");
+	if (!wma)
 		return WLAN_PHYMODE_AUTO;
-	}
 
 	if (chan_width >= CH_WIDTH_INVALID) {
 		wma_err_rl("Invalid channel width %d", chan_width);
@@ -983,10 +978,8 @@ void wma_check_and_set_wake_timer(uint32_t time)
 	bool is_set_key_in_progress = false;
 	t_wma_handle *wma = cds_get_context(QDF_MODULE_ID_WMA);
 
-	if (!wma) {
-		wma_err("WMA is closed");
+	if (!wma)
 		return;
-	}
 
 	if (!wmi_service_enabled(wma->wmi_handle,
 		wmi_service_wow_wakeup_by_timer_pattern)) {
@@ -1208,10 +1201,8 @@ int wma_oem_data_response_handler(void *handle,
 	struct oem_data_rsp *oem_rsp;
 	struct mac_context *pmac = cds_get_context(QDF_MODULE_ID_PE);
 
-	if (!pmac) {
-		wma_err("Invalid pmac");
+	if (!pmac)
 		return -EINVAL;
-	}
 
 	if (!pmac->sme.oem_data_rsp_callback) {
 		wma_err("Callback not registered");
@@ -3393,10 +3384,8 @@ void wma_send_regdomain_info_to_fw(uint32_t reg_dmn, uint16_t regdmn2G,
 	wma_debug("reg_dmn: %d regdmn2g: %d regdmn5g :%d ctl2g: %d ctl5g: %d",
 		 reg_dmn, regdmn2G, regdmn5G, ctl2G, ctl5G);
 
-	if (!wma) {
-		wma_err("wma context is NULL");
+	if (!wma)
 		return;
-	}
 
 	status = wmi_unified_send_regdomain_info_to_fw_cmd(wma->wmi_handle,
 			reg_dmn, regdmn2G, regdmn5G, ctl2G, ctl5G);
@@ -3462,7 +3451,6 @@ int wma_update_tdls_peer_state(WMA_HANDLE handle,
 	}
 
 	if (!soc) {
-		wma_err("SOC context is NULL");
 		ret = -EINVAL;
 		goto end_tdls_peer_state;
 	}
@@ -3648,10 +3636,9 @@ int wma_get_apf_caps_event_handler(void *handle, u_int8_t *cmd_param_info,
 	struct mac_context *pmac = (struct mac_context *)cds_get_context(
 				QDF_MODULE_ID_PE);
 
-	if (!pmac) {
-		wma_err("Invalid pmac");
+	if (!pmac)
 		return -EINVAL;
-	}
+
 	if (!pmac->sme.apf_get_offload_cb) {
 		wma_err("Callback not registered");
 		return -EINVAL;
@@ -3878,10 +3865,8 @@ int wma_apf_read_work_memory_event_handler(void *handle, uint8_t *evt_buf,
 		return -EINVAL;
 	}
 
-	if (!pmac) {
-		wma_err("Invalid pmac");
+	if (!pmac)
 		return -EINVAL;
-	}
 
 	if (!pmac->sme.apf_read_mem_cb) {
 		wma_err("Callback not registered");
@@ -3944,10 +3929,8 @@ QDF_STATUS wma_set_tx_rx_aggr_size(uint8_t vdev_id,
 
 	wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
 
-	if (!wma_handle) {
-		wma_err("WMA context is invalid!");
+	if (!wma_handle)
 		return QDF_STATUS_E_INVAL;
-	}
 
 	intr = wma_handle->interfaces;
 	if (!intr) {
@@ -4418,10 +4401,8 @@ int wma_get_arp_stats_handler(void *handle, uint8_t *data,
 	struct rsp_stats rsp = {0};
 	struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE);
 
-	if (!mac) {
-		wma_err("Invalid mac context");
+	if (!mac)
 		return -EINVAL;
-	}
 
 	if (!mac->sme.get_arp_stats_cb) {
 		wma_err("Callback not registered");
@@ -4677,10 +4658,8 @@ int wma_chan_info_event_handler(void *handle, uint8_t *event_buf,
 	if (wma && wma->cds_context)
 		mac = (struct mac_context *)cds_get_context(QDF_MODULE_ID_PE);
 
-	if (!mac) {
-		wma_err("Invalid mac context");
+	if (!mac)
 		return -EINVAL;
-	}
 
 	param_buf = (WMI_CHAN_INFO_EVENTID_param_tlvs *)event_buf;
 	if (!param_buf)  {
@@ -4979,10 +4958,9 @@ static void wma_send_set_key_rsp(uint8_t vdev_id, bool pairwise,
 	tp_wma_handle wma = cds_get_context(QDF_MODULE_ID_WMA);
 	struct qdf_mac_addr bcast_mac = QDF_MAC_ADDR_BCAST_INIT;
 
-	if (!wma) {
-		wma_err("WMA context does not exist");
+	if (!wma)
 		return;
-	}
+
 	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(wma->psoc,
 						    vdev_id,
 						    WLAN_LEGACY_WMA_ID);
@@ -5050,10 +5028,8 @@ void wma_set_peer_ucast_cipher(uint8_t *mac_addr,
 	struct wlan_objmgr_peer *peer;
 	tp_wma_handle wma = cds_get_context(QDF_MODULE_ID_WMA);
 
-	if (!wma) {
-		wma_err("wma context is NULL");
+	if (!wma)
 		return;
-	}
 
 	peer = wlan_objmgr_get_peer(wma->psoc,
 				    wlan_objmgr_pdev_get_pdev_id(wma->pdev),
@@ -5085,10 +5061,9 @@ void wma_update_set_key(uint8_t session_id, bool pairwise,
 	tp_wma_handle wma = cds_get_context(QDF_MODULE_ID_WMA);
 	struct wma_txrx_node *iface;
 
-	if (!wma) {
-		wma_err("Invalid WMA context");
+	if (!wma)
 		return;
-	}
+
 	iface = &wma->interfaces[session_id];
 	if (!iface) {
 		wma_err("iface not found for session id %d", session_id);