mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
PM / devfreq: add missing of_node_put after calling of_parse_phandle
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: MyungJoo Ham <[email protected]> Cc: Kyungmin Park <[email protected]> Signed-off-by: Peter Chen <[email protected]> Signed-off-by: MyungJoo Ham <[email protected]>
This commit is contained in:
parent
99e65ae09a
commit
3427c6f0b6
1 changed files with 2 additions and 0 deletions
|
|
@ -707,10 +707,12 @@ struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index)
|
|||
if (devfreq->dev.parent
|
||||
&& devfreq->dev.parent->of_node == node) {
|
||||
mutex_unlock(&devfreq_list_lock);
|
||||
of_node_put(node);
|
||||
return devfreq;
|
||||
}
|
||||
}
|
||||
mutex_unlock(&devfreq_list_lock);
|
||||
of_node_put(node);
|
||||
|
||||
return ERR_PTR(-EPROBE_DEFER);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue