Skip to content

Commit 7706b0a

Browse files
jameshilliardgregkh
authored andcommitted
component: Silence bind error on -EPROBE_DEFER
If a component fails to bind due to -EPROBE_DEFER we should not log an error as this is not a real failure. Fixes messages like: vc4-drm soc:gpu: failed to bind 3f902000.hdmi (ops vc4_hdmi_ops): -517 vc4-drm soc:gpu: master bind failed: -517 Signed-off-by: James Hilliard <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 00b2475 commit 7706b0a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

drivers/base/component.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,8 @@ static int try_to_bring_up_master(struct master *master,
256256
ret = master->ops->bind(master->dev);
257257
if (ret < 0) {
258258
devres_release_group(master->dev, NULL);
259-
dev_info(master->dev, "master bind failed: %d\n", ret);
259+
if (ret != -EPROBE_DEFER)
260+
dev_info(master->dev, "master bind failed: %d\n", ret);
260261
return ret;
261262
}
262263

@@ -611,8 +612,9 @@ static int component_bind(struct component *component, struct master *master,
611612
devres_release_group(component->dev, NULL);
612613
devres_release_group(master->dev, NULL);
613614

614-
dev_err(master->dev, "failed to bind %s (ops %ps): %d\n",
615-
dev_name(component->dev), component->ops, ret);
615+
if (ret != -EPROBE_DEFER)
616+
dev_err(master->dev, "failed to bind %s (ops %ps): %d\n",
617+
dev_name(component->dev), component->ops, ret);
616618
}
617619

618620
return ret;

0 commit comments

Comments
 (0)