Skip to contentSkip to conversation

i2c: qup: Fix pm_runtime_get_sync usage

PATCH Applied Andy Gross 4 participants 4 messages May 3, 2014 – May 14, 2014

Subsystems (2)
lore
Share & tools
lore

Andy Gross

author
#0 lore raw

PATCH 1/1 i2c: qup: Fix pm_runtime_get_sync usage

This patch corrects the error check on the call to pm_runtime_get_sync.

---
 drivers/i2c/busses/i2c-qup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-qup.c +1 -1
index 1b4cf14..2a5efb5 100644
@@ -479,7 +479,7 @@ static int qup_i2c_xfer(struct i2c_adapter *adap,
 	int ret, idx;
 
 	ret = pm_runtime_get_sync(qup->dev);
-	if (ret)
+	if (ret < 0)
 		goto out;
 
 	writel(1, qup->base + QUP_SW_RESET);
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Andy Gross

This patch corrects the error check on the call to pm_runtime_get_sync.

Quoted 17 lines
---
 drivers/i2c/busses/i2c-qup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-qup.c +1 -1
index 1b4cf14..2a5efb5 100644
@@ -479,7 +479,7 @@ static int qup_i2c_xfer(struct i2c_adapter *adap,
 	int ret, idx;
 
 	ret = pm_runtime_get_sync(qup->dev);
-	if (ret)
+	if (ret < 0)
 		goto out;
 
 	writel(1, qup->base + QUP_SW_RESET);
Acked-by on v1 1/1
#2 lore raw
In reply to Andy Gross

On Fri, May 2, 2014 at 6:54 PM, Andy Gross <[email protected]> wrote:
[...]

drivers/i2c/busses/i2c-qup.c static int qup_i2c_xfer(struct i2c_adapter *adap, · line 483

Quoted 7 lines
drivers/i2c/busses/i2c-qup.c +1 -1
@@ -479,7 +479,7 @@ static int qup_i2c_xfer(struct i2c_adapter *adap,
        int ret, idx;
 
        ret = pm_runtime_get_sync(qup->dev);
-       if (ret)
+       if (ret < 0)
                goto out;

Sorry about that, thought I tested that path properly. Wolfram, please pick this up as soon as possible as it renders the driver useless if one enables pm runtime.

Regards,
Bjorn

Applied
#3 lore raw
In reply to Andy Gross
Quoted 3 lines · Andy Gross

This patch corrects the error check on the call to pm_runtime_get_sync.

Applied to for-current, thanks!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140514/aaec0090/attachment.sig>