[PATCH v3 2/3] firmware_loader: fix positive return value being treat as error return

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Kweh, Hock Leong" <hock.leong.kweh@xxxxxxxxx>

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@xxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-efi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux