diff options
author | Anton Vorontsov <cbouatmailru@gmail.com> | 2011-11-25 02:49:45 +0400 |
---|---|---|
committer | Anton Vorontsov <cbouatmailru@gmail.com> | 2011-11-25 02:54:59 +0400 |
commit | 47f0ac2b0a8c7f26b513a2a18045219b030aedf1 (patch) | |
tree | 27f33a5c1e40ee2a494758c1da2e03e86a09e32c /drivers/base/firmware_class.c | |
parent | 7925231037447d1a9036f31c823d362bf2ef4bb0 (diff) | |
parent | c3b92c8787367a8bb53d57d9789b558f1295cc96 (diff) |
Merge tag 'v3.1' from git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git into master
Battery tree missed last merge window, so it became stale enough
so that patches no longer apply as people use pretty recent kernels.
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); |