net: wireless: libertas: cmd.c: Cleaning up uninitialized variables
authorRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Sun, 1 Jun 2014 12:39:20 +0000 (14:39 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 19 Jun 2014 19:49:14 +0000 (15:49 -0400)
There is a risk that the variable will be used without being initialized.

This was largely found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/cmd.c

index aaa297315c47102df73b6fd3948e4b8fd4cbba25..0387a5b380c80f5eeafd05c53c3ec12fc5b892f5 100644 (file)
@@ -1111,6 +1111,7 @@ int lbs_set_radio(struct lbs_private *priv, u8 preamble, u8 radio_on)
 
        cmd.hdr.size = cpu_to_le16(sizeof(cmd));
        cmd.action = cpu_to_le16(CMD_ACT_SET);
+       cmd.control = 0;
 
        /* Only v8 and below support setting the preamble */
        if (priv->fwrelease < 0x09000000) {