diff options
| author | Sameer Thalappil <sameert@codeaurora.org> | 2017-02-08 15:45:49 -0800 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2017-02-09 15:48:14 -0800 |
| commit | 44ca684e16dd6100d1863595b4ef05ddae96a830 (patch) | |
| tree | c0a100aa17b9d5400e4c1ee2de792787ac49ee5d | |
| parent | 0e8f32d145bc43a4e1f9848058822b5d453f9e8e (diff) | |
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
| -rw-r--r-- | core/cds/src/cds_api.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c index efbe4926ddf9..3c0868d86853 100644 --- a/core/cds/src/cds_api.c +++ b/core/cds/src/cds_api.c @@ -1673,6 +1673,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; + } status = qdf_runtime_lock_init(&recovery_lock); if (QDF_STATUS_SUCCESS != status) { |
