diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 3cc558df82955c3dc06a2be876f0f377674aa4d0..478006b7764a5919259e8b582dedfd3a1f5358f5 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -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); }