diff options
author | Arnd Bergmann <arnd@arndb.de> | 2011-09-20 21:45:56 +0200 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2011-09-20 21:45:56 +0200 |
commit | 1fdb4888e45f1413972a8e9da55f3ffc08b9abcb (patch) | |
tree | 635ef73cdff38d21a529bbdcab4cd2cb39a29484 /drivers/base/firmware_class.c | |
parent | 1884af9365a96314164f4110d4528d425e5dd843 (diff) | |
parent | ceb1c532ba6220900e61ec7073a9234661efa450 (diff) |
Merge branch 'omap/cleanup' into next/cleanup
Diffstat (limited to 'drivers/base/firmware_class.c')
-rw-r--r-- | drivers/base/firmware_class.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index bbb03e6f725..06ed6b4e7df 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); |