diff options
Diffstat (limited to 'drivers/base/power/domain.c')
-rw-r--r-- | drivers/base/power/domain.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index c22b869245d9..96b71b6536d6 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c | |||
@@ -1862,7 +1862,7 @@ int pm_genpd_attach_cpuidle(struct generic_pm_domain *genpd, int state) | |||
1862 | cpuidle_drv = cpuidle_driver_ref(); | 1862 | cpuidle_drv = cpuidle_driver_ref(); |
1863 | if (!cpuidle_drv) { | 1863 | if (!cpuidle_drv) { |
1864 | ret = -ENODEV; | 1864 | ret = -ENODEV; |
1865 | goto out; | 1865 | goto err_drv; |
1866 | } | 1866 | } |
1867 | if (cpuidle_drv->state_count <= state) { | 1867 | if (cpuidle_drv->state_count <= state) { |
1868 | ret = -EINVAL; | 1868 | ret = -EINVAL; |
@@ -1884,6 +1884,9 @@ int pm_genpd_attach_cpuidle(struct generic_pm_domain *genpd, int state) | |||
1884 | 1884 | ||
1885 | err: | 1885 | err: |
1886 | cpuidle_driver_unref(); | 1886 | cpuidle_driver_unref(); |
1887 | |||
1888 | err_drv: | ||
1889 | kfree(cpu_data); | ||
1887 | goto out; | 1890 | goto out; |
1888 | } | 1891 | } |
1889 | 1892 | ||