From patchwork Thu Dec 12 19:10:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin King X-Patchwork-Id: 11289309 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4E2C1138C for ; Thu, 12 Dec 2019 19:10:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 36D6B22527 for ; Thu, 12 Dec 2019 19:10:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730525AbfLLTKu (ORCPT ); Thu, 12 Dec 2019 14:10:50 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:60870 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730355AbfLLTKt (ORCPT ); Thu, 12 Dec 2019 14:10:49 -0500 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1ifTrI-0000w1-HG; Thu, 12 Dec 2019 19:10:44 +0000 From: Colin King To: Kalle Valo , "David S . Miller" , Pradeep Kumar Chitrapu , Ganesh Sesetti , Karthikeyan Periyasamy , John Crispin , ath11k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH][next] ath11k: fix uninitialized variable radioup Date: Thu, 12 Dec 2019 19:10:44 +0000 Message-Id: <20191212191044.107544-1-colin.king@canonical.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Colin Ian King The variable radioup is not uninitalized so it may contain a garbage value and hence the detection of a radio that is not up is buggy. Fix this by initializing it to zero. Addresses-Coverity: ("Uninitalized scalar variable") Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Colin Ian King --- drivers/net/wireless/ath/ath11k/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/debug.c b/drivers/net/wireless/ath/ath11k/debug.c index c27fffd13a5d..34b960453edc 100644 --- a/drivers/net/wireless/ath/ath11k/debug.c +++ b/drivers/net/wireless/ath/ath11k/debug.c @@ -541,7 +541,7 @@ static ssize_t ath11k_write_simulate_fw_crash(struct file *file, struct ath11k *ar = ab->pdevs[0].ar; char buf[32] = {0}; ssize_t rc; - int i, ret, radioup; + int i, ret, radioup = 0; for (i = 0; i < ab->num_radios; i++) { pdev = &ab->pdevs[i];