Switches are either listed in device tree or platform_data. They should exist. If the probe fails, defer the probe, which is the likely cause of failure, not broken device tree or platform data.
Signed-off-by: Andrew Lunn <and...@lunn.ch> Acked-by: Florian Fainelli <f.faine...@gmail.com> --- net/dsa/dsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index f3ffc937b152..c61b7ab092f5 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c @@ -435,7 +435,7 @@ dsa_switch_setup(struct dsa_switch_tree *dst, int index, if (drv == NULL) { netdev_err(dst->master_netdev, "[%d]: could not detect attached switch\n", index); - return ERR_PTR(-EINVAL); + return ERR_PTR(-EPROBE_DEFER); } netdev_info(dst->master_netdev, "[%d]: detected a %s switch\n", index, name); -- 2.7.0