From 922d5a4dbf34e8bc70bd03916c8ce38398a7dbab Mon Sep 17 00:00:00 2001 From: Ashok Ponnaiah Date: Tue, 25 Apr 2017 16:52:02 +0530 Subject: [PATCH] qcacmn: Add NULL check for regulatory tx ops Add NULL check for regulatory tx ops Change-Id: Ib2cc4c795948111c9405ae14de66ad1ab5ccbdd8 --- umac/regulatory/dispatcher/src/wlan_reg_services_api.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/umac/regulatory/dispatcher/src/wlan_reg_services_api.c b/umac/regulatory/dispatcher/src/wlan_reg_services_api.c index e182e5d1e83b..b53c6dd32962 100644 --- a/umac/regulatory/dispatcher/src/wlan_reg_services_api.c +++ b/umac/regulatory/dispatcher/src/wlan_reg_services_api.c @@ -347,7 +347,8 @@ QDF_STATUS regulatory_psoc_open(struct wlan_objmgr_psoc *psoc) struct wlan_lmac_if_reg_tx_ops *tx_ops; tx_ops = get_reg_psoc_tx_ops(psoc); - tx_ops->register_master_handler(psoc, NULL); + if (tx_ops->register_master_handler) + tx_ops->register_master_handler(psoc, NULL); return QDF_STATUS_SUCCESS; }; @@ -357,7 +358,8 @@ QDF_STATUS regulatory_psoc_close(struct wlan_objmgr_psoc *psoc) struct wlan_lmac_if_reg_tx_ops *tx_ops; tx_ops = get_reg_psoc_tx_ops(psoc); - tx_ops->unregister_master_handler(psoc, NULL); + if (tx_ops->unregister_master_handler) + tx_ops->unregister_master_handler(psoc, NULL); return QDF_STATUS_SUCCESS; };