mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/3] firmware loader: fix firmware -ENOENT situations
@ 2012-08-20 11:04 Ming Lei
  2012-08-20 11:04 ` [PATCH 2/3] firmware loader: let caching firmware piggyback on loading firmware Ming Lei
  2012-08-20 11:04 ` [PATCH 3/3] MAINTAINERS: update maintain status of FIRMWARE LOADER Ming Lei
  0 siblings, 2 replies; 3+ messages in thread
From: Ming Lei @ 2012-08-20 11:04 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Ming Lei

If the requested firmware image doesn't exist, firmware->priv
should be set for the later concurrent requests, otherwise
warning and oops will be triggered inside firmware_free_data().

Signed-off-by: Ming Lei <ming.lei@canonical.com>
---
 drivers/base/firmware_class.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index ed0510a..edc88bc 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -718,6 +718,7 @@ _request_firmware_prepare(const struct firmware **firmware_p, const char *name,
 	mutex_lock(&fw_lock);
 	if (test_bit(FW_STATUS_ABORT, &buf->status)) {
 		fw_priv = ERR_PTR(-ENOENT);
+		firmware->priv = buf;
 		_request_firmware_cleanup(firmware_p);
 		goto exit;
 	} else if (test_bit(FW_STATUS_DONE, &buf->status)) {
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-08-20 11:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-20 11:04 [PATCH 1/3] firmware loader: fix firmware -ENOENT situations Ming Lei
2012-08-20 11:04 ` [PATCH 2/3] firmware loader: let caching firmware piggyback on loading firmware Ming Lei
2012-08-20 11:04 ` [PATCH 3/3] MAINTAINERS: update maintain status of FIRMWARE LOADER Ming Lei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®