Messages in this thread Patch in this message |  | | From | "Kweh, Hock Leong" <> | Subject | [PATCH v3 2/3] firmware_loader: fix positive return value being treat as error return | Date | Sat, 11 Apr 2015 03:40:43 +0800 |
| |
From: "Kweh, Hock Leong" <hock.leong.kweh@intel.com>
Due to wait_for_completion_interruptible_timeout() will return its remaining timeout jiffies value if timeout does not happen, the error check code "if (ret)" will treat that as error return. So, fixing the issue by re-assigning back a 'Zero' to the return value when the wait is completed without timeout.
Signed-off-by: Kweh, Hock Leong <hock.leong.kweh@intel.com> --- drivers/base/firmware_class.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index e03235d..b38975d 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c @@ -923,6 +923,8 @@ static int _request_firmware_load(struct firmware_priv *fw_priv, mutex_lock(&fw_lock); fw_load_abort(fw_priv); mutex_unlock(&fw_lock); + } else { + retval = 0; } if (is_fw_load_aborted(buf)) -- 1.7.9.5
|  |