diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 9ad8c5f96500..b65fce32e88c 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -2333,6 +2333,10 @@ int rproc_add(struct rproc *rproc) struct device *dev = &rproc->dev; int ret; + ret = rproc_validate(rproc); + if (ret < 0) + return ret; + /* add char device for this remoteproc */ ret = rproc_char_device_add(rproc); if (ret < 0) @@ -2342,10 +2346,6 @@ int rproc_add(struct rproc *rproc) if (ret < 0) return ret; - ret = rproc_validate(rproc); - if (ret < 0) - return ret; - dev_info(dev, "%s is available\n", rproc->name); /* create debugfs entries */