From: Junyong Sun <sunjy516@gmail.com>
To: mcgrof@kernel.org, gregkh@linuxfoundation.org, rafael@kernel.org,
sunjunyong@xiaomi.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] firmware: fix a double abort case with fw_load_sysfs_fallback
Date: Fri, 28 Feb 2020 15:56:33 +0800 [thread overview]
Message-ID: <1582876593-27926-1-git-send-email-sunjunyong@xiaomi.com> (raw)
fw_sysfs_wait_timeout may return err with -ENOENT
at fw_load_sysfs_fallback and firmware is already
in abort status, no need to abort again, so skip it.
Signed-off-by: Junyong Sun <sunjunyong@xiaomi.com>
---
drivers/base/firmware_loader/fallback.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/firmware_loader/fallback.c b/drivers/base/firmware_loader/fallback.c
index 8704e1b..1e9c96e 100644
--- a/drivers/base/firmware_loader/fallback.c
+++ b/drivers/base/firmware_loader/fallback.c
@@ -525,7 +525,7 @@ static int fw_load_sysfs_fallback(struct fw_sysfs *fw_sysfs,
}
retval = fw_sysfs_wait_timeout(fw_priv, timeout);
- if (retval < 0) {
+ if (retval < 0 && retval != -ENOENT) {
mutex_lock(&fw_lock);
fw_load_abort(fw_sysfs);
mutex_unlock(&fw_lock);
--
2.7.4
next reply other threads:[~2020-02-28 7:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-28 7:56 Junyong Sun [this message]
2020-02-28 13:07 ` [PATCH] firmware: fix a double abort case with fw_load_sysfs_fallback Luis Chamberlain
2020-03-02 9:23 ` sunjunyong
2020-03-02 18:40 ` Luis Chamberlain
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1582876593-27926-1-git-send-email-sunjunyong@xiaomi.com \
--to=sunjy516@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=rafael@kernel.org \
--cc=sunjunyong@xiaomi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).