Skip to contentSkip to conversation

pwm: silently error on EPROBE_DEFER

PATCH Applied Jerome Brunet 3 participants 3 messages May 23, 2017 – Jul 6, 2017

Subsystems (2)
lore
Share & tools
lore

Jerome Brunet

author reviewer
#0 lore raw

PATCH 1/1 pwm: silently error on EPROBE_DEFER

In of_pwm_chip, if we fail to get the pwm chip due to probe defer, we shouldn't print an error message. Just be silent in this case.

---
 drivers/pwm/core.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/pwm/core.c +3 -1
index a0860b30bd93..1581f6ab1b1f 100644
@@ -678,7 +678,9 @@ struct pwm_device *of_pwm_get(struct device_node *np, const char *con_id)
 
 	pc = of_node_to_pwmchip(args.np);
 	if (IS_ERR(pc)) {
-		pr_err("%s(): PWM chip not found\n", __func__);
+		if (PTR_ERR(pc) != -EPROBE_DEFER)
+			pr_err("%s(): PWM chip not found\n", __func__);
+
 		pwm = ERR_CAST(pc);
 		goto put;
 	}
Signature · 1 line
2.9.4
Reviewed-by on v1 1/1
#1 lore raw

Am 23.05.2017 um 18:05 schrieb Jerome Brunet:

Quoted 4 lines

In of_pwm_chip, if we fail to get the pwm chip due to probe defer, we shouldn't print an error message. Just be silent in this case.

Those messages are indeed irritating.

Thanks,
Andreas

Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
#2 lore raw
In reply to Jerome Brunet
Quoted 7 lines · Jerome Brunet

In of_pwm_chip, if we fail to get the pwm chip due to probe defer, we shouldn't print an error message. Just be silent in this case.

---
 drivers/pwm/core.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Applied, thanks.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-amlogic/attachments/20170706/618718ad/attachment.sig>