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
Signed-off-by: Johan Hovold <[email protected]>
---
drivers/soundwire/bus_type.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/soundwire/bus_type.c b/drivers/soundwire/bus_type.c
index c32faace618f..8c3746f0d527 100644
--- a/drivers/soundwire/bus_type.c
+++ b/drivers/soundwire/bus_type.c
@@ -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);
--
2.44.1
On Mon, Jun 03, 2024 at 02:31:27PM +0200, Johan Hovold wrote:
> 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