Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263283
b: refs/heads/master
c: caca951
h: refs/heads/master
i:
  263281: 8ec16d7
  263279: 9f4d9d8
v: v3
  • Loading branch information
Linus Torvalds committed Aug 24, 2011
1 parent db99812 commit 3adf739
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 650cf77d750153a5c1f51ae78a93f399151032d1
refs/heads/master: caca9510ff4e5d842c0589110243d60927836222
11 changes: 6 additions & 5 deletions trunk/drivers/base/firmware_class.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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);

Expand Down

0 comments on commit 3adf739

Please sign in to comment.