mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
qcacld-3.0: Add null check for hdd_ctx in mode change shutdown/restart
Add null check for hdd_ctx in mode change shutdown and restart callbacks. Change-Id: I03be071f44b7315aab18d8d38250709553a20a9e CRs-Fixed: 2475044
This commit is contained in:
parent
4e3f275a80
commit
47b772928b
1 changed files with 6 additions and 0 deletions
|
|
@ -13628,6 +13628,9 @@ static int hdd_mode_change_psoc_idle_shutdown(struct device *dev)
|
|||
{
|
||||
struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
|
||||
|
||||
if (!hdd_ctx)
|
||||
return -EINVAL;
|
||||
|
||||
return hdd_wlan_stop_modules(hdd_ctx, true);
|
||||
}
|
||||
|
||||
|
|
@ -13635,6 +13638,9 @@ static int hdd_mode_change_psoc_idle_restart(struct device *dev)
|
|||
{
|
||||
struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
|
||||
|
||||
if (!hdd_ctx)
|
||||
return -EINVAL;
|
||||
|
||||
return hdd_wlan_start_modules(hdd_ctx, false);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue