Forwarded: [PATCH 1/1] assert that the firmware has not been loaded before waiting for load completion

syzbot posted 1 patch 2 months, 1 week ago
drivers/net/wireless/marvell/libertas/main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Forwarded: [PATCH 1/1] assert that the firmware has not been loaded before waiting for load completion
Posted by syzbot 2 months, 1 week ago
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.

***

Subject: [PATCH 1/1] assert that the firmware has not been loaded before waiting for load completion
Author: jakovnovak30@gmail.com

#syz test

Signed-off-by: Jakov Novak <jakovnovak30@gmail.com>
---
 drivers/net/wireless/marvell/libertas/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/marvell/libertas/main.c b/drivers/net/wireless/marvell/libertas/main.c
index dd97f1b61f4d..18356b09ccfc 100644
--- a/drivers/net/wireless/marvell/libertas/main.c
+++ b/drivers/net/wireless/marvell/libertas/main.c
@@ -910,7 +910,8 @@ void lbs_remove_card(struct lbs_private *priv)
 	if (priv->wiphy_registered)
 		lbs_scan_deinit(priv);
 
-	lbs_wait_for_firmware_load(priv);
+	if (priv->fw_callback)
+		lbs_wait_for_firmware_load(priv);
 
 	/* worker thread destruction blocks on the in-flight command which
 	 * should have been cleared already in lbs_stop_card().
-- 
2.53.0