From d6fbcdd4e750e9400454e1f948c2fa9f0e6e8fa5 Mon Sep 17 00:00:00 2001 From: Shashikala Prabhu Date: Thu, 4 Jun 2020 13:03:33 +0530 Subject: [PATCH] qcacmn: Do not dereference the NULL rx_ops pointer Do not dereference the NULL rx_ops pointer. Change-Id: I999f3876801b61014aedb59402d2816627d0f28a CRs-Fixed: 2702455 --- target_if/mlme/psoc/src/target_if_psoc_timer_tx_ops.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target_if/mlme/psoc/src/target_if_psoc_timer_tx_ops.c b/target_if/mlme/psoc/src/target_if_psoc_timer_tx_ops.c index 7d46db88d5e4..805e0a39f16f 100644 --- a/target_if/mlme/psoc/src/target_if_psoc_timer_tx_ops.c +++ b/target_if/mlme/psoc/src/target_if_psoc_timer_tx_ops.c @@ -41,7 +41,7 @@ QDF_STATUS target_if_psoc_vdev_rsp_timer_inuse(struct wlan_objmgr_psoc *psoc, } rx_ops = target_if_vdev_mgr_get_rx_ops(psoc); - if (!rx_ops && !rx_ops->psoc_get_vdev_response_timer_info) { + if (!(rx_ops && rx_ops->psoc_get_vdev_response_timer_info)) { mlme_err("VDEV_%d PSOC_%d No Rx Ops", vdev_id, wlan_psoc_get_id(psoc)); return QDF_STATUS_E_INVAL; @@ -76,7 +76,7 @@ QDF_STATUS target_if_psoc_vdev_rsp_timer_init(struct wlan_objmgr_psoc *psoc, } rx_ops = target_if_vdev_mgr_get_rx_ops(psoc); - if (!rx_ops && !rx_ops->psoc_get_vdev_response_timer_info) { + if (!(rx_ops && rx_ops->psoc_get_vdev_response_timer_info)) { mlme_err("VDEV_%d PSOC_%d No Rx Ops", vdev_id, wlan_psoc_get_id(psoc)); return QDF_STATUS_E_INVAL; @@ -113,7 +113,7 @@ void target_if_psoc_vdev_rsp_timer_deinit(struct wlan_objmgr_psoc *psoc, } rx_ops = target_if_vdev_mgr_get_rx_ops(psoc); - if (!rx_ops && !rx_ops->psoc_get_vdev_response_timer_info) { + if (!(rx_ops && rx_ops->psoc_get_vdev_response_timer_info)) { mlme_err("VDEV_%d PSOC_%d No Rx Ops", vdev_id, wlan_psoc_get_id(psoc)); return; @@ -138,7 +138,7 @@ void target_if_flush_psoc_vdev_timers(struct wlan_objmgr_psoc *psoc) int i; rx_ops = target_if_vdev_mgr_get_rx_ops(psoc); - if (!rx_ops && !rx_ops->psoc_get_vdev_response_timer_info) { + if (!(rx_ops && rx_ops->psoc_get_vdev_response_timer_info)) { mlme_err("PSOC_%d No Rx Ops", wlan_psoc_get_id(psoc)); return; } @@ -166,7 +166,7 @@ QDF_STATUS target_if_vdev_mgr_rsp_timer_mod( } rx_ops = target_if_vdev_mgr_get_rx_ops(psoc); - if (!rx_ops && !rx_ops->psoc_get_vdev_response_timer_info) { + if (!(rx_ops && rx_ops->psoc_get_vdev_response_timer_info)) { mlme_err("VDEV_%d PSOC_%d No Rx Ops", vdev_id, wlan_psoc_get_id(psoc)); return QDF_STATUS_E_FAILURE;