mirror of
https://github.com/torvalds/linux.git
synced 2026-08-02 05:12:01 +02:00
cpufreq: qcom-hw: Add device NULL check in notify/polling callback
If cpu is hotplugged then policy->cpus is cleared in cpufreq_offline which will results in device being NULL on last CPU hotplugged out. Also since cpu is hotplugged out, polling callback can safely be ignored in this case. Change-Id: Ic2d29fe2bdd7c6aa1e952d700d11e321e69f6acb Signed-off-by: Vivek Aknurwar <quic_viveka@quicinc.com>
This commit is contained in:
parent
b83f18ed9a
commit
6d360fbe4b
|
|
@ -361,6 +361,9 @@ static void qcom_lmh_dcvs_notify(struct qcom_cpufreq_data *data)
|
|||
unsigned long freq_hz, throttled_freq;
|
||||
struct dev_pm_opp *opp;
|
||||
|
||||
if (!dev)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Get the h/w throttled frequency, normalize it using the
|
||||
* registered opp table and use it to calculate thermal pressure.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user