diff mbox

[37/40] pm2301-charger: Reference put missing after access

Message ID 1360932310-30065-38-git-send-email-lee.jones@linaro.org
State Accepted
Commit 9b7f50e3ea9a98f518fc4077f8bebc96717acff5
Headers show

Commit Message

Lee Jones Feb. 15, 2013, 12:45 p.m. UTC
From: Rupesh Kumar <rupesh.kumar@stericsson.com>

Added missing pm_runtime_put_sync in read & write.

Signed-off-by: Rupesh Kumar <rupesh.kumar@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Sandeep TRIPATHY <sandeep.tripathy@stericsson.com>
Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
---
 drivers/power/pm2301_charger.c |    4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

diff --git a/drivers/power/pm2301_charger.c b/drivers/power/pm2301_charger.c
index ea9870d..af12af8 100644
--- a/drivers/power/pm2301_charger.c
+++ b/drivers/power/pm2301_charger.c
@@ -139,6 +139,8 @@  static int pm2xxx_reg_read(struct pm2xxx_charger *pm2, int reg, u8 *val)
 	else
 		ret = 0;
 
+	pm_runtime_put_sync(pm2->dev);
+
 	return ret;
 }
 
@@ -156,6 +158,8 @@  static int pm2xxx_reg_write(struct pm2xxx_charger *pm2, int reg, u8 val)
 	else
 		ret = 0;
 
+	pm_runtime_put_sync(pm2->dev);
+
 	return ret;
 }