[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1355501220-4572-3-git-send-email-sjur.brandeland@stericsson.com>
Date: Fri, 14 Dec 2012 17:06:51 +0100
From: Sjur Brændeland <sjur.brandeland@...ricsson.com>
To: Ohad Ben-Cohen <ohad@...ery.com>
Cc: Linus Walleij <linus.walleij@...aro.org>,
linux-kernel@...r.kernel.org,
Sjur Brændeland <sjur@...ndeland.net>,
Sjur Brændeland <sjur.brandeland@...ricsson.com>
Subject: [RFCv2 02/11] remoteproc: Move check on firmware name to rproc_add
Verify that firmware name is defined in rproc_add.
Signed-off-by: Sjur Brændeland <sjur.brandeland@...ricsson.com>
---
drivers/remoteproc/remoteproc_core.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index feb39a7..7d593a1 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -989,13 +989,6 @@ int rproc_boot(struct rproc *rproc)
return ret;
}
- /* loading a firmware is required */
- if (!rproc->firmware) {
- dev_err(dev, "%s: no firmware to load\n", __func__);
- ret = -EINVAL;
- goto unlock_mutex;
- }
-
/* prevent underlying implementation from being removed */
if (!try_module_get(dev->parent->driver->owner)) {
dev_err(dev, "%s: can't get owner\n", __func__);
@@ -1120,6 +1113,12 @@ int rproc_add(struct rproc *rproc)
struct device *dev = &rproc->dev;
int ret;
+ /* loading a firmware is required */
+ if (!rproc->firmware) {
+ dev_err(dev, "%s: no firmware to load\n", __func__);
+ return -EINVAL;
+ }
+
ret = device_add(dev);
if (ret < 0)
return ret;
--
1.7.5.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists