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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Jan 2017 07:24:44 +0000 (08:24 +0100)
commitebdfcaa14eef97ae0711823524fd8c8865c05933
tree52773b2e39d753580d82e50ab576e95c4cf5943d
parent7959835473173638527f3d294fcccb1b1697bd92
PM / devfreq: Fix the bug of devfreq_add_device when governor is NULL

commit 73613b16cb5c5d5a659fc8832eff99eead3f9afb upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/devfreq/devfreq.c