PM / Sleep: Fix read_unlock_usermodehelper() call.
authorTetsuo Handa <[email protected]>
Mon, 23 Jan 2012 20:59:08 +0000 (21:59 +0100)
committerRafael J. Wysocki <[email protected]>
Mon, 23 Jan 2012 20:59:08 +0000 (21:59 +0100)
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 <[email protected]>
Acked-by: Srivatsa S. Bhat <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
drivers/base/firmware_class.c

index 26ab358dac62daf5cac1531eeb0cf24546c42efd..6c9387d646ecccc0d9c8fa62f6f8ce54593894a9 100644 (file)
@@ -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)) {