mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
qcacld-3.0: Check hdd_ctx for null in hdd_get_bandwidth_level
Check for hdd_context validity before accessing current throughput level in hdd_get_bandwidth_level. Change-Id: I8cb3a0e484e4350938e28c4f704498aa24ed2c14 CRs-Fixed: 2669231
This commit is contained in:
parent
fc55b957c8
commit
ed577367b4
1 changed files with 5 additions and 1 deletions
|
|
@ -84,9 +84,13 @@ static inline void hdd_remove_pm_qos(struct device *dev)
|
|||
*/
|
||||
static int hdd_get_bandwidth_level(void *data)
|
||||
{
|
||||
int ret = PLD_BUS_WIDTH_NONE;
|
||||
struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
|
||||
|
||||
return hdd_get_current_throughput_level(hdd_ctx);
|
||||
if (hdd_ctx)
|
||||
ret = hdd_get_current_throughput_level(hdd_ctx);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue