Skip to contentSkip to conversation

soundwire: bus: suppress probe deferral errors

PATCH Superseded Johan Hovold 2 participants 2 messages Jun 3, 2024 – Jun 4, 2024 SoundWire

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 soundwire: bus: suppress probe deferral errors

Use dev_err_probe() to avoid logging errors on probe deferral:

	wsa884x-codec sdw:4:0:0217:0204:00:0: Probe of wsa884x-codec failed: -517
---
 drivers/soundwire/bus_type.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/soundwire/bus_type.c +2 -2
index c32faace618f..8c3746f0d527 100644
@@ -112,9 +112,9 @@ static int sdw_drv_probe(struct device *dev)
 		if (!name)
 			name = drv->driver.name;
 
-		dev_err(dev, "Probe of %s failed: %d\n", name, ret);
 		dev_pm_domain_detach(dev, false);
-		return ret;
+
+		return dev_err_probe(dev, ret, "Probe of %s failed\n", name);
 	}
 
 	mutex_lock(&slave->sdw_dev_lock);
Signature · 1 line
2.44.1
#1 lore raw
Quoted 3 lines · Johan Hovold

Use dev_err_probe() to avoid logging errors on probe deferral:

	wsa884x-codec sdw:4:0:0217:0204:00:0: Probe of wsa884x-codec failed: -517

The error message here should just be removed as it is already logged by driver core and does not provide any additional information.

I've sent a v2 here:

	https://lore.kernel.org/lkml/[email protected]/

Johan