mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
qcacld-3.0: add check for qdf_ctx
Add NULL check for qdf_ctx to avoid dereference. Change-Id: I75f5f2baafdf6b9c1a7587a3d17934c9246acccd CRs-Fixed: 2326306
This commit is contained in:
parent
dc5ae4d501
commit
dfb40924f5
1 changed files with 5 additions and 0 deletions
|
|
@ -2606,6 +2606,11 @@ bool cds_is_fw_down(void)
|
|||
qdf_device_t qdf_ctx;
|
||||
|
||||
qdf_ctx = cds_get_context(QDF_MODULE_ID_QDF_DEVICE);
|
||||
if (!qdf_ctx) {
|
||||
cds_err("cds context is invalid");
|
||||
return false;
|
||||
}
|
||||
|
||||
return pld_is_fw_down(qdf_ctx->dev);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue