summaryrefslogtreecommitdiffstats
path: root/drivers/base/firmware_class.c
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2012-01-23 21:59:08 +0100
committerRafael J. Wysocki <rjw@sisk.pl>2012-01-23 21:59:08 +0100
commite4c89a508f4385a0cd8681c2749a2cd2fa476e40 (patch)
tree0fd1683eb20ae32d80078fb8a585178838e1d242 /drivers/base/firmware_class.c
parent72081624d5ad3cf56deb6e727b78c4e7a55e4eec (diff)
downloadblackbird-obmc-linux-e4c89a508f4385a0cd8681c2749a2cd2fa476e40.tar.gz
blackbird-obmc-linux-e4c89a508f4385a0cd8681c2749a2cd2fa476e40.zip
PM / Sleep: Fix read_unlock_usermodehelper() call.
Commit b298d289 "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>
Diffstat (limited to 'drivers/base/firmware_class.c')
-rw-r--r--drivers/base/firmware_class.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 26ab358dac62..6c9387d646ec 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -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)) {
OpenPOWER on IntegriCloud