Skip to content

Commit

Permalink
PM / Sleep: Fix read_unlock_usermodehelper() call.
Browse files Browse the repository at this point in the history
Commit b298d28
 "PM / Sleep: Fix freezer failures due to racy usermodehelper_is_disabled()"
added read_unlock_usermodehelper() but read_unlock_usermodehelper() is called
without read_lock_usermodehelper() when kmalloc() failed.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Acked-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
  • Loading branch information
Tetsuo Handa authored and Rafael J. Wysocki committed Jan 23, 2012
1 parent 7208162 commit e4c89a5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/base/firmware_class.c
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,7 @@ static int _request_firmware(const struct firmware **firmware_p,
if (!firmware) {
dev_err(device, "%s: kmalloc(struct firmware) failed\n",
__func__);
retval = -ENOMEM;
goto out;
return -ENOMEM;
}

if (fw_get_builtin_firmware(firmware, name)) {
Expand Down

0 comments on commit e4c89a5

Please sign in to comment.