state: return -EPROBE_DEFER if the backend isn't available
This commit is contained in:
parent
177c5b7739
commit
23f5b62169
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue