Skip to contentSkip to conversation

i2c: return probe deferred status on dev_pm_domain_attach

PATCH Superseded Kieran Bingham 2 participants 7 messages Oct 11, 2015 – Oct 12, 2015

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c: return probe deferred status on dev_pm_domain_attach

A change of return status was introduced in commit 3fffd1283927 ("i2c: allow specifying separate wakeup interrupt in device tree")

The commit prevents the defer status being passed up the call stack appropriately when dev_pm_domain_attach returns -EPROBE_DEFER.

To fix we change this back to the original return status;

---

 drivers/i2c/i2c-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/i2c-core.c +1 -1
index 5f89f1e..df83015 100644
@@ -701,7 +701,7 @@ static int i2c_device_probe(struct device *dev)
 			goto err_detach_pm_domain;
 	}
 
-	return 0;
+	return status;
 
 err_detach_pm_domain:
 	dev_pm_domain_detach(&client->dev, true);
Signature · 1 line
2.1.4
#1 lore raw

Hi Kiera,

Quoted 2 lines · Kieran Bingham

A change of return status was introduced in commit 3fffd1283927 ("i2c: allow specifying separate wakeup interrupt in device tree")

Thanks for catching this!

Quoted 4 lines

The commit prevents the defer status being passed up the call stack appropriately when dev_pm_domain_attach returns -EPROBE_DEFER.

To fix we change this back to the original return status;

What about going to the error path?

Quoted 1 line

Please add a "Fixes: <sha1>" tag here.

Wolfram

#2 lore raw

And add the original patch author to CC when resending.

#3 lore raw
Quoted 3 lines · Wolfram Sang

And add the original patch author to CC when resending.

Bah - I was sure I'd added him ... must have slipped.

Should I add Cc: stable? or are they notified from the Fixes: tag? --
Regards

Kieran

#4 lore raw
Quoted 2 lines

Should I add Cc: stable? or are they notified from the Fixes: tag?

My preference is: I'll add stable when I commit to my tree. I am happy if people tell me when they think this should be done.

In this case, it should :)

#5 lore raw
Quoted 8 lines · Wolfram Sang
Quoted 2 lines

Should I add Cc: stable? or are they notified from the Fixes: tag?

My preference is: I'll add stable when I commit to my tree. I am happy if people tell me when they think this should be done.

In this case, it should :)

Agreed :)
I'm happy to follow your process and preference and let you add.

- Patch v2 posted.

--
Regards

Kieran

#6 lore raw
In reply to Wolfram Sang

Hi Wolfram,

Quoted 7 lines · Wolfram Sang

Hi Kiera,

Quoted 2 lines · Kieran Bingham

A change of return status was introduced in commit 3fffd1283927 ("i2c: allow specifying separate wakeup interrupt in device tree")

Thanks for catching this!

NP : Saw it when re-basing my other series.

Quoted 6 lines
Quoted 4 lines

The commit prevents the defer status being passed up the call stack appropriately when dev_pm_domain_attach returns -EPROBE_DEFER.

To fix we change this back to the original return status;

What about going to the error path?

Sounds reasonable :D

Quoted 3 lines
Quoted 1 line

Please add a "Fixes: <sha1>" tag here.

Sure.

Quoted 3 lines

Wolfram