]> git.openfabrics.org - ~shefty/rdma-dev.git/blobdiff - drivers/base/power/domain.c
Merge branch 'pm-qos'
[~shefty/rdma-dev.git] / drivers / base / power / domain.c
index e2cf392d99d2f94de37fb42aee507e1dc917d00c..acc3a8ded29d0e45d704f6f3ecef261e70e6a5c2 100644 (file)
@@ -1871,7 +1871,7 @@ int pm_genpd_attach_cpuidle(struct generic_pm_domain *genpd, int state)
        cpuidle_drv = cpuidle_driver_ref();
        if (!cpuidle_drv) {
                ret = -ENODEV;
-               goto out;
+               goto err_drv;
        }
        if (cpuidle_drv->state_count <= state) {
                ret = -EINVAL;
@@ -1893,6 +1893,9 @@ int pm_genpd_attach_cpuidle(struct generic_pm_domain *genpd, int state)
 
  err:
        cpuidle_driver_unref();
+
+ err_drv:
+       kfree(cpu_data);
        goto out;
 }