summaryrefslogtreecommitdiffstats
path: root/drivers/base/firmware_class.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2011-09-10 22:58:42 +0200
committerArnd Bergmann <arnd@arndb.de>2011-09-10 22:58:42 +0200
commit72787aa866bfa6bcbd259e7a39b2f9a2f412794e (patch)
tree1769d854a26f444875f7cdfd9982fe494a4cff71 /drivers/base/firmware_class.c
parentad9f6677575e80ce23cb491d5ffb7b536772552e (diff)
parent0a072a247fa79979dd31813decb6b118d7d511fd (diff)
downloadtalos-op-linux-72787aa866bfa6bcbd259e7a39b2f9a2f412794e.tar.gz
talos-op-linux-72787aa866bfa6bcbd259e7a39b2f9a2f412794e.zip
Merge branches 'tegra/board' and 'at91/board' into next/board
Diffstat (limited to 'drivers/base/firmware_class.c')
-rw-r--r--drivers/base/firmware_class.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index bbb03e6f7255..06ed6b4e7df5 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -521,11 +521,6 @@ static int _request_firmware(const struct firmware **firmware_p,
if (!firmware_p)
return -EINVAL;
- if (WARN_ON(usermodehelper_is_disabled())) {
- dev_err(device, "firmware: %s will not be loaded\n", name);
- return -EBUSY;
- }
-
*firmware_p = firmware = kzalloc(sizeof(*firmware), GFP_KERNEL);
if (!firmware) {
dev_err(device, "%s: kmalloc(struct firmware) failed\n",
@@ -539,6 +534,12 @@ static int _request_firmware(const struct firmware **firmware_p,
return 0;
}
+ if (WARN_ON(usermodehelper_is_disabled())) {
+ dev_err(device, "firmware: %s will not be loaded\n", name);
+ retval = -EBUSY;
+ goto out;
+ }
+
if (uevent)
dev_dbg(device, "firmware: requesting %s\n", name);
OpenPOWER on IntegriCloud