Skip to contentSkip to conversation

libertas: add terminating entry to fw_table

PATCH Superseded Oliver Neukum 2 participants 2 messages Jul 11, 2019

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libertas: add terminating entry to fw_table

In case no firmware was found, the system would happily read and try to load garbage. Terminate the table properly.

Fixes ce84bb69f50e6 ("libertas USB: convert to asynchronous firmware loading")
Reported-by [email protected]
---
 drivers/net/wireless/marvell/libertas/if_usb.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/wireless/marvell/libertas/if_usb.c +4 -1
index f1622f0ff8c9..b79c65547f4c 100644
@@ -50,7 +50,10 @@ static const struct lbs_fw_table fw_table[] = {
 	{ MODEL_8388, "libertas/usb8388_v5.bin", NULL },
 	{ MODEL_8388, "libertas/usb8388.bin", NULL },
 	{ MODEL_8388, "usb8388.bin", NULL },
-	{ MODEL_8682, "libertas/usb8682.bin", NULL }
+	{ MODEL_8682, "libertas/usb8682.bin", NULL },
+
+	/*terminating entry - keep at end */
+	{ MODEL_8388, NULL, NULL }
 };
 
 static const struct usb_device_id if_usb_table[] = {
Signature · 1 line
2.16.4
#1 lore raw

Hello!

Quoted 5 lines · Oliver Neukum

In case no firmware was found, the system would happily read and try to load garbage. Terminate the table properly.

Fixes ce84bb69f50e6 ("libertas USB: convert to asynchronous firmware loading")

The Fixed: tag should precede the sign-offs, according to DaveM...

Quoted 1 line
Reported-by [email protected]

That should be the 1st tag, I think...

Quoted 9 lines
---
 drivers/net/wireless/marvell/libertas/if_usb.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/wireless/marvell/libertas/if_usb.c +0 -0
index f1622f0ff8c9..b79c65547f4c 100644

drivers/net/wireless/marvell/libertas/if_usb.c static const struct lbs_fw_table fw_table[] = { · line 55

Quoted 7 lines
drivers/net/wireless/marvell/libertas/if_usb.c +3 -1
@@ -50,7 +50,10 @@ static const struct lbs_fw_table fw_table[] = {
 	{ MODEL_8388, "libertas/usb8388_v5.bin", NULL },
 	{ MODEL_8388, "libertas/usb8388.bin", NULL },
 	{ MODEL_8388, "usb8388.bin", NULL },
-	{ MODEL_8682, "libertas/usb8682.bin", NULL }
+	{ MODEL_8682, "libertas/usb8682.bin", NULL },
+
+	/*terminating entry - keep at end */

Why no space after /* ?

drivers/net/wireless/marvell/libertas/if_usb.c static const struct lbs_fw_table fw_table[] = { · line 59

Quoted 4 lines
drivers/net/wireless/marvell/libertas/if_usb.c +1 -0
+	{ MODEL_8388, NULL, NULL }
 };
 
 static const struct usb_device_id if_usb_table[] = {

MBR, Sergei