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

Lee Jones lee.jones at linaro.org
Fri Feb 15 07:45:07 EST 2013


From: Rupesh Kumar <rupesh.kumar at stericsson.com>

Added missing pm_runtime_put_sync in read & write.

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

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;
 }
 
-- 
1.7.10.4




More information about the linux-arm-kernel mailing list