Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5997174ybc; Wed, 27 Nov 2019 13:07:42 -0800 (PST) X-Google-Smtp-Source: APXvYqyUou8L9y7EFUrtwXLYjQMYiTx3u0NnUcWeQa4QKwA4gYJ1RgmbeoaAEjR5aYDi6JNYXz5l X-Received: by 2002:a17:906:d924:: with SMTP id rn4mr9136513ejb.213.1574888862492; Wed, 27 Nov 2019 13:07:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574888862; cv=none; d=google.com; s=arc-20160816; b=BRQ0GdnZCSZVJEoGTn2Hl/w/6K9KG2zhhR6vJDSlkc3vX8x1C7PZXdWPDji09+wMpw k1upmPF9ldm9saziTF29UNfiVakIWbxwR2eepAWLTMaHIcsahkpvU1OlT9MdjbXPBM41 KIUdarDrV6m4/JhZLPCwwSqQySBkBJ43rVig7sKlXzLfZOOvD6N0MF1x7zlorg0BFdQk K1x5znrH7iNT8HfQmUAevKinM7IfkgYI0Kb4O0JWrpsE/4rBMVf0QZ4dXlA8xjYShzej FVjknj6zEcFfc0xxjxa+T6czKXKMZN/Ejwku7fGwic8KqkZUaCvYKo/XLp2VOmK8AFQ8 2i3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/zX9UDxnZ/962EGWzVg0UsMxjxLadIT9xDliWUo7Tgg=; b=yJ4sanfSQbZbs2hwlwx5KMNa3DrjY4pZ//0ABXmaklZ6uTnYc024rYSjIVzWVLjdFr j8xTvhRWKTEwtB35ZGxBH3bRBhuumkqIKhPhsJDTNS1+7vDfrftDh1VU+ZefPpxvEY3o /kBY4dU50RImOxViqf8LYaeL/HaOmg3QRqc2y9qvSXqfX8JQ7h/mvtGaD/SWsMNfnO3j k6VE1/1GfFQq3pi9EZ7y1OhNdw/4DtIBYc9act6yFlQAkUM7vA3WlPLXLrKK+KL5TkK9 1o9ySW9xU+Y8zNavFXFWp2oIC+M12QNLAlXxiixdn/cWDcR7zlq8S4U8rUC37JWxfRdm KS8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="yPrd/ysb"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b19si11751345edb.40.2019.11.27.13.07.19; Wed, 27 Nov 2019 13:07:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="yPrd/ysb"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732087AbfK0VGF (ORCPT + 99 others); Wed, 27 Nov 2019 16:06:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:59934 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731434AbfK0VGB (ORCPT ); Wed, 27 Nov 2019 16:06:01 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D497620637; Wed, 27 Nov 2019 21:06:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888761; bh=57A37uReFpaoVHM91/3bIBAXphIRLjuVkZlIK30VGwc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yPrd/ysb9EteZ+L2F1/MCrTeBTmWSG5OC4X81U6fz7sVLkvcTGRmkEnccITM81n0t e8K62UeQQYrokNbwWMWS+62jB8XN0jpeVGzuycoeTyH+tldrDsPm0sBtnZBhCRGenr w3LsKH+GwBqqIeacgNs1300xh8FjRlypslLaq+Y8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rajkumar Manoharan , "John W. Linville" , Kalle Valo , "David S. Miller" , Denis Efremov Subject: [PATCH 4.19 259/306] ath9k_hw: fix uninitialized variable data Date: Wed, 27 Nov 2019 21:31:49 +0100 Message-Id: <20191127203133.761466019@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Denis Efremov commit 80e84f36412e0c5172447b6947068dca0d04ee82 upstream. Currently, data variable in ar9003_hw_thermo_cal_apply() could be uninitialized if ar9300_otp_read_word() will fail to read the value. Initialize data variable with 0 to prevent an undefined behavior. This will be enough to handle error case when ar9300_otp_read_word() fails. Fixes: 80fe43f2bbd5 ("ath9k_hw: Read and configure thermocal for AR9462") Cc: Rajkumar Manoharan Cc: John W. Linville Cc: Kalle Valo Cc: "David S. Miller" Cc: stable@vger.kernel.org Signed-off-by: Denis Efremov Signed-off-by: Kalle Valo Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c @@ -4183,7 +4183,7 @@ static void ar9003_hw_thermometer_apply( static void ar9003_hw_thermo_cal_apply(struct ath_hw *ah) { - u32 data, ko, kg; + u32 data = 0, ko, kg; if (!AR_SREV_9462_20_OR_LATER(ah)) return;