PM / devfreq: Fix the bug of devfreq_add_device when governor is NULL
authorChanwoo Choi <cw00.choi@samsung.com>
Wed, 28 Dec 2016 11:52:35 +0000 (20:52 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Mon, 4 Sep 2017 05:33:30 +0000 (14:33 +0900)
commitcd458f79b091922ccff7688a826fb730c08cd9a9
treeeb16ee77f7c2560608d951a2935cb08cace85068
parent2b5324f9a8ea57102cb7996b6f49967f6204e679
PM / devfreq: Fix the bug of devfreq_add_device when governor is NULL

This patch fixes the bug of devfreq_add_device(). The devfreq device must
have the default governor. If find_devfreq_governor() returns error,
devfreq_add_device() fail to add the devfreq instance.

Fixes: 1b5c1be2c88e (PM / devfreq: map devfreq drivers to governor using name)
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/devfreq/devfreq.c