diff options
Diffstat (limited to 'kernel/drivers/remoteproc/remoteproc_core.c')
-rw-r--r-- | kernel/drivers/remoteproc/remoteproc_core.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/kernel/drivers/remoteproc/remoteproc_core.c b/kernel/drivers/remoteproc/remoteproc_core.c index 9e03d158f..4f7ce0097 100644 --- a/kernel/drivers/remoteproc/remoteproc_core.c +++ b/kernel/drivers/remoteproc/remoteproc_core.c @@ -1239,11 +1239,6 @@ int rproc_add(struct rproc *rproc) if (ret < 0) return ret; - /* expose to rproc_get_by_phandle users */ - mutex_lock(&rproc_list_mutex); - list_add(&rproc->node, &rproc_list); - mutex_unlock(&rproc_list_mutex); - dev_info(dev, "%s is available\n", rproc->name); dev_info(dev, "Note: remoteproc is still under development and considered experimental.\n"); @@ -1251,8 +1246,16 @@ int rproc_add(struct rproc *rproc) /* create debugfs entries */ rproc_create_debug_dir(rproc); + ret = rproc_add_virtio_devices(rproc); + if (ret < 0) + return ret; - return rproc_add_virtio_devices(rproc); + /* expose to rproc_get_by_phandle users */ + mutex_lock(&rproc_list_mutex); + list_add(&rproc->node, &rproc_list); + mutex_unlock(&rproc_list_mutex); + + return 0; } EXPORT_SYMBOL(rproc_add); |