mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
qcacld-3.0: Add sanity check for hdd context
Add sanity check for hdd context and return if hdd context is null. Change-Id: Ibef56ee7d0b0505643e04583a78b4924e4bc20bf CRs-Fixed: 2462701
This commit is contained in:
parent
221bf3cebc
commit
d62104a8b0
1 changed files with 10 additions and 0 deletions
|
|
@ -9267,6 +9267,11 @@ int hdd_psoc_idle_shutdown(struct device *dev)
|
|||
{
|
||||
struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
|
||||
|
||||
if (!hdd_ctx) {
|
||||
hdd_err_rl("hdd ctx is null");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (is_mode_change_psoc_idle_shutdown)
|
||||
return __hdd_mode_change_psoc_idle_shutdown(hdd_ctx);
|
||||
else
|
||||
|
|
@ -9282,6 +9287,11 @@ int hdd_psoc_idle_restart(struct device *dev)
|
|||
{
|
||||
struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
|
||||
|
||||
if (!hdd_ctx) {
|
||||
hdd_err_rl("hdd ctx is null");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return __hdd_psoc_idle_restart(hdd_ctx);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue