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:
Rajeev Kumar 2019-06-19 14:01:59 -07:00 • committed by nshrivas
commit 47b772928b

View file

@ -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);
}