qcacld-3.0: Add NULL check in cds_trigger_recovery()

Add a NULL check before de-referencing CDF context pointer.

CRs-Fixed: 2004243
Change-Id: I0aa644d9ad2d154526ee015e57e9132c26c5fd91
This commit is contained in:
Sameer Thalappil 2017-02-08 15:45:49 -08:00 • committed by qcabuildsw
commit ec2e9c7553

View file

@ -1586,6 +1586,11 @@ void cds_trigger_recovery(bool skip_crash_inject)
"WMA context is invalid!");
return;
}
if (!qdf_ctx) {
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
"QDF context is invalid!");
return;
}
recovery_lock = qdf_runtime_lock_init("cds_recovery");
if (!recovery_lock) {