diff options
author | Kevin Hilman <khilman@ti.com> | 2012-06-26 18:45:32 -0700 |
---|---|---|
committer | Wolfram Sang <w.sang@pengutronix.de> | 2012-08-18 10:11:44 +0200 |
commit | 33ec5e818b7b0d0d02864a9586050c6f9a6a8b98 (patch) | |
tree | f0e832844b23273bbd6f46eb0a4ae2e06eb94bd4 /drivers/i2c | |
parent | b007a3ef958413736a9e2ba698ad6675a9d519ab (diff) | |
download | kernel_goldelico_gta04-33ec5e818b7b0d0d02864a9586050c6f9a6a8b98.zip kernel_goldelico_gta04-33ec5e818b7b0d0d02864a9586050c6f9a6a8b98.tar.gz kernel_goldelico_gta04-33ec5e818b7b0d0d02864a9586050c6f9a6a8b98.tar.bz2 |
I2C: OMAP: xfer: fix runtime PM get/put balance on error
In omap_i2c_xfer(), ensure pm_runtime_put() is called, even on
failure.
Without this, after a failed xfer, the runtime PM usecount will have
been incremented, but not decremented causing the usecount to never
reach zero after a failure. This keeps the device always runtime PM
enabled which keeps the enclosing power domain active, and prevents
full-chip retention/off from happening during idle.
Signed-off-by: Kevin Hilman <khilman@ti.com>
Reviewed-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-omap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index 6849635..5d19a49 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -584,7 +584,7 @@ omap_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) r = pm_runtime_get_sync(dev->dev); if (IS_ERR_VALUE(r)) - return r; + goto out; r = omap_i2c_wait_for_bb(dev); if (r < 0) |