From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752665AbcEKSyg (ORCPT ); Wed, 11 May 2016 14:54:36 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:35342 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751875AbcEKSye (ORCPT ); Wed, 11 May 2016 14:54:34 -0400 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: rtlwifi: rtl818x: silence uninitialized variable warning From: Kalle Valo In-Reply-To: <20160504061639.GB22064@mwanda> To: Dan Carpenter Cc: Larry Finger , Chaoming Li , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Message-Id: <20160511185433.DE30C61344@smtp.codeaurora.org> Date: Wed, 11 May 2016 18:54:33 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dan Carpenter wrote: > What about if "rtlphy->pwrgroup_cnt" is 2? In that case we would use an > uninitialized "chnlgroup" variable and probably crash. Maybe that can't > happen for some reason which is not obvious but in that case this patch > is harmless. > > Setting it to zero seems like a standard default in the surrounding code > so it's probably fine here as well. > > Signed-off-by: Dan Carpenter Thanks, 1 patch applied to wireless-drivers-next.git: 2f8514b8b036 rtlwifi: rtl818x: silence uninitialized variable warning -- Sent by pwcli https://patchwork.kernel.org/patch/9010761/