iwlegacy: avoid warning about missing braces
authorArnd Bergmann <arnd@arndb.de>
Thu, 19 May 2016 07:58:49 +0000 (09:58 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 14 Jun 2016 14:26:22 +0000 (17:26 +0300)
gcc-6 warns about code in il3945_hw_txq_ctx_free() being
somewhat ambiguous:

drivers/net/wireless/intel/iwlegacy/3945.c:1022:5: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]

This adds a set of curly braces to avoid the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/intel/iwlegacy/3945.c

index 7bcedbb53d9482ecbe6462aefcf47608df946ec8..209dc99884550b9fc62c24d4e98e9450f12753ff 100644 (file)
@@ -1019,12 +1019,13 @@ il3945_hw_txq_ctx_free(struct il_priv *il)
        int txq_id;
 
        /* Tx queues */
-       if (il->txq)
+       if (il->txq) {
                for (txq_id = 0; txq_id < il->hw_params.max_txq_num; txq_id++)
                        if (txq_id == IL39_CMD_QUEUE_NUM)
                                il_cmd_queue_free(il);
                        else
                                il_tx_queue_free(il, txq_id);
+       }
 
        /* free tx queue structure */
        il_free_txq_mem(il);