Browse Source

qcacmn: Fix passing NULL vdev object to object manager

Fix passing NULL vdev object to object manager. Currently during unload
process, we are purging all the cmds in the cmd list. In this case
pointer vdev_id is passed as NULL since we wanted to clean up cmds
associated with all the vdevs. In wlan_serialization_purge_cmd_list()
vdev remains NULL in this scenario which results in an ASSERT in
wlan_objmgr_vdev_release_ref().

This change set will call wlan_objmgr_vdev_release_ref only if vdev is
not NULL.

Change-Id: I29a6114f4b5d9fcabe24b82f26defd8ab58cceec
CRs-Fixed: 2029580
Krishna Kumaar Natarajan 8 years ago
parent
commit
8e039b16e1

+ 3 - 1
umac/cmn_services/serialization/src/wlan_serialization_legacy_api.c

@@ -465,7 +465,9 @@ void wlan_serialization_purge_cmd_list(struct wlan_objmgr_psoc *psoc,
 	}
 	wlan_objmgr_pdev_release_ref(pdev, WLAN_SERIALIZATION_ID);
 release_vdev_ref:
-	wlan_objmgr_vdev_release_ref(vdev, WLAN_SERIALIZATION_ID);
+	/* vdev could be NULL if vdev_id passed is NULL */
+	if (vdev)
+		wlan_objmgr_vdev_release_ref(vdev, WLAN_SERIALIZATION_ID);
 
 	return;
 }