summaryrefslogtreecommitdiff
path: root/umac
diff options
context:
space:
mode:
authorVivek Chettri <vchettri@codeaurora.org>2018-02-08 14:22:25 +0530
committersnandini <snandini@codeaurora.org>2018-02-13 04:53:31 -0800
commit40789ff92d544960bd6922cf70d2fed1949ea4a7 (patch)
treeea38a65229ad8d1bbb90b7949f2d720b1a7a32bd /umac
parent339dc26b217746a64234170679f91f2f5d140e70 (diff)
downloadqca-wfi-host-cmn-40789ff92d544960bd6922cf70d2fed1949ea4a7.tar.gz
qcacmn: Add NULL check for wdev member of vdev's ospriv
Add NULL check for access to wdev. There could be cases where the wdev could not we initialized to appropriate values, so we should have a NULL check before we access its members. CR's Fixed: 2168374 Change-Id: Id0a3f9b64c5e9beed86f5a3c019a5fe5dbdb8bd7
Diffstat (limited to 'umac')
-rw-r--r--umac/cmn_services/utils/src/wlan_utility.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/umac/cmn_services/utils/src/wlan_utility.c b/umac/cmn_services/utils/src/wlan_utility.c
index 5875db675..1d9bc5204 100644
--- a/umac/cmn_services/utils/src/wlan_utility.c
+++ b/umac/cmn_services/utils/src/wlan_utility.c
@@ -252,6 +252,11 @@ uint8_t *wlan_util_vdev_get_if_name(struct wlan_objmgr_vdev *vdev)
return NULL;
}
+ if (!osif_priv->wdev) {
+ wlan_vdev_obj_unlock(vdev);
+ return NULL;
+ }
+
name = osif_priv->wdev->netdev->name;
wlan_vdev_obj_unlock(vdev);