qcacmn: Check for NULL pointer before de-referencing it

Pointer 'hif_ctx' returned from call to function 'cds_get_context'
may be NULL. Check for NULL pointer before de-referencing it.

Change-Id: I6c909b2c62e1bf6945a4cc40315e8fdad4a0aa83
CRs-Fixed: 2726335
This commit is contained in:
Aditya Kodukula
2020-07-07 16:36:23 -07:00
committed by nshrivas
parent 2b3f9a1057
commit b25366fa6f

View File

@@ -583,6 +583,9 @@ void qdf_runtime_lock_deinit(qdf_runtime_lock_t *lock)
{
void *hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
if (!hif_ctx)
return;
if (!lock)
return;