summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnirudh Ghayal <aghayal@codeaurora.org>2016-03-30 10:29:13 +0530
committerJeevan Shriram <jshriram@codeaurora.org>2016-04-22 11:57:46 -0700
commit3cca8e1af8f75f43d4ca556dae8c656ecbf3aff5 (patch)
tree632154abf0ed790aff119d91d752269aad8ab8e3
parentd9a90463d37b29bcba02c16d61fdae645f884bee (diff)
regulator: cpr-regulator: Fix memory leak
Fix a memory leaks and an uninitialized variable access in the CPR regulator driver. CRs-Fixed: 996609 Change-Id: Idea45963653dbf65a3eb48d518fe4e7dc3844f65 Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
-rw-r--r--drivers/regulator/cpr-regulator.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/regulator/cpr-regulator.c b/drivers/regulator/cpr-regulator.c
index 4c21851333c2..49941e368756 100644
--- a/drivers/regulator/cpr-regulator.c
+++ b/drivers/regulator/cpr-regulator.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -1299,6 +1299,8 @@ _exit:
val = (cpr_vreg->ref_clk_khz * cpr_vreg->timer_delay_us) / 1000;
cpr_write(cpr_vreg, REG_RBCPR_TIMER_INTERVAL, val);
+ kfree(quot_delta_results);
+
return rc;
}
@@ -3807,8 +3809,8 @@ static int cpr_aging_init(struct platform_device *pdev,
i, cpr_vreg->cpr_fuse_target_quot[i]);
}
-err:
kfree(fuse_sel_orig);
+err:
kfree(aging_sensor_id);
return rc;
}