From patchwork Sat Jun 11 18:59:30 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Michael_B=C3=BCsch?= X-Patchwork-Id: 872242 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5BIxfUW017574 for ; Sat, 11 Jun 2011 18:59:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751730Ab1FKS7i (ORCPT ); Sat, 11 Jun 2011 14:59:38 -0400 Received: from bues.ch ([80.190.117.144]:49014 "EHLO bues.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751119Ab1FKS7h (ORCPT ); Sat, 11 Jun 2011 14:59:37 -0400 Received: by bues.ch with esmtpsa (Exim 4.69) (envelope-from ) id 1QVTPF-00051Z-3Q; Sat, 11 Jun 2011 20:59:37 +0200 Date: Sat, 11 Jun 2011 20:59:30 +0200 From: Michael =?UTF-8?B?QsO8c2No?= To: "John W. Linville" Cc: Connor Hansen , linux-wireless@vger.kernel.org Subject: [PATCH] drivers/ssb/driver_chipcommon_pmu.c: uninitilized warning Message-ID: <20110611205930.28418623@maggie> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; powerpc-unknown-linux-gnu) Mime-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Sat, 11 Jun 2011 18:59:42 +0000 (UTC) From: Connor Hansen warning message drivers/ssb/driver_chipcommon_pmu.c: In function ssb_pmu_resources_init drivers/ssb/driver_chipcommon_pmu.c:420:15: warning: updown_tab_size may be used uninitilized in this function. updown_tab_size and depend_tab_size may not be set in the bus->chip_id switch statement, so set to 0 by default to avoid using uninitialized stack space. Signed-off-by: Connor Hansen Signed-off-by: Michael Buesch --- John, can you take care of this one, please? It's purely cosmetical, so not CCing stable. drivers/ssb/driver_chipcommon_pmu.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/ssb/driver_chipcommon_pmu.c b/drivers/ssb/driver_chipcommon_pmu.c index 305ade7..a7aef47 100644 --- a/drivers/ssb/driver_chipcommon_pmu.c +++ b/drivers/ssb/driver_chipcommon_pmu.c @@ -417,9 +417,9 @@ static void ssb_pmu_resources_init(struct ssb_chipcommon *cc) u32 min_msk = 0, max_msk = 0; unsigned int i; const struct pmu_res_updown_tab_entry *updown_tab = NULL; - unsigned int updown_tab_size; + unsigned int updown_tab_size = 0; const struct pmu_res_depend_tab_entry *depend_tab = NULL; - unsigned int depend_tab_size; + unsigned int depend_tab_size = 0; switch (bus->chip_id) { case 0x4312: