From 2ff274ae4f886a5f290e34e0d7917ef3e3e4c8c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Wed, 13 May 2015 11:04:55 +0200 Subject: [PATCH] state: return -EPROBE_DEFER if the backend isn't available --- drivers/misc/state.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/misc/state.c b/drivers/misc/state.c index 563aed2b7..5a418d327 100644 --- a/drivers/misc/state.c +++ b/drivers/misc/state.c @@ -52,6 +52,8 @@ static int state_probe(struct device_d *dev) /* guess if of_path is a path, not a phandle */ if (of_path[0] == '/') { ret = of_find_path(np, "backend", &path); + if (ret == -ENODEV) + ret = -EPROBE_DEFER; if (ret) goto out_release; } else { @@ -66,7 +68,7 @@ static int state_probe(struct device_d *dev) dev = of_find_device_by_node(partition_node); if (!list_is_singular(&dev->cdevs)) { - ret = -ENODEV; + ret = -EPROBE_DEFER; goto out_release; }