LKML Archive on
help / color / mirror / Atom feed
From: Zahari Doychev <>
Subject: [PATCH v2] drivers: base: fw: fix ret value when loading fw
Date: Tue, 10 Mar 2015 10:45:40 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

When using the user mode helper to load firmwares the function _request_firmware
gets a positive return value from fw_load_from_user_helper and because of this
the firmware buffer is not assigned. This happens only when the return value
is zero. This patch fixes this problem in _request_firmware_load. When the
completion is ready the return value is set to zero.

Signed-off-by: Zahari Doychev <>

Changes from v1:
 - move handling of wait_for_completion_interruptible_timeout() return value

 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 6c5c9ed..4996541 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -913,6 +913,8 @@ static int _request_firmware_load(struct firmware_priv *fw_priv,
+	} else if (retval > 0) {
+		retval = 0;
 	if (is_fw_load_aborted(buf))

  reply	other threads:[~2015-03-10  9:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-09 15:49 [PATCH] fix loading of firmware with user mode helper Zahari Doychev
2015-03-09 15:49 ` [PATCH] drivers: base: fw: fix ret value when loading fw Zahari Doychev
2015-03-10  7:32   ` Ming Lei
2015-03-10  9:45     ` Zahari Doychev [this message]
2015-03-18  7:41       ` [PATCH v2] " Zahari Doychev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \
    --subject='Re: [PATCH v2] drivers: base: fw: fix ret value when loading fw' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).