Message ID | 1430980885-639-4-git-send-email-joel@jms.id.au |
---|---|
State | Accepted |
Headers | show
Return-Path: <skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 24AF914027F for <incoming@patchwork.ozlabs.org>; Thu, 7 May 2015 16:42:33 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=jms.id.au header.i=@jms.id.au header.b=hOn3G26N; dkim-atps=neutral Received: from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 00DBA1A0DF3 for <incoming@patchwork.ozlabs.org>; Thu, 7 May 2015 16:42:33 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=jms.id.au header.i=@jms.id.au header.b=hOn3G26N; dkim-atps=neutral X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from mail-pa0-x232.google.com (mail-pa0-x232.google.com [IPv6:2607:f8b0:400e:c03::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id A9C9E1A0862 for <skiboot@lists.ozlabs.org>; Thu, 7 May 2015 16:42:26 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=jms.id.au header.i=@jms.id.au header.b=hOn3G26N; dkim-atps=neutral Received: by pacyx8 with SMTP id yx8so31704975pac.1 for <skiboot@lists.ozlabs.org>; Wed, 06 May 2015 23:42:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jms.id.au; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=orqQrC0HAR1LP36FmQRssjDnC93tFlqyBJSeuawYb3U=; b=hOn3G26NkqyjNjj+IYO+5+lOZEEMX2tZjNCy8E3h0m8IzvgiEEL/wPY/YhilQ8rhoq OiC9dYvrwDeFyQqktYW9HOVyCKZeB2FL0VitO9sxuY/S/iyIL5kKMMY73XlEQXMjJnBe 3YAZ8U0JcnnOv1VIhy9L/hRDCFiT/4pUsT4Pw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=orqQrC0HAR1LP36FmQRssjDnC93tFlqyBJSeuawYb3U=; b=FdiH8zAGuOe2+yFNmdhYYS8ysyjLTYq1E/WlDMa9sETISWRcmg6xEKaycrk2NV29zd oClQCsGAxsd62L4hHJRJTZWJGrjX9Nbe/z00mWqq5Sl8s0Z0Fpr2BdRysyNaKfJtA7mI Gb9ea3KqHYuFLn6L2PCH9Kqde0kWTCWQd/RaNHtzDFHr3HkU4Ry+ZkwxKTEHcL3K6hd3 zUteNAixtvg8/tGSc+McC+OZpLX361AWYwLiJVMthkhefqaTH3qsi8722kz/UrRr8Otm CKSNbHdrgh1n4CFMzKg9VQpinGQDOi4Svk2Hu8JsLI2g6I4e/dKe60ODAb5tGqQKiRbI Lpmw== X-Gm-Message-State: ALoCoQkVnFEd62i+RXyoW9Z7KJOdTKVxevaB516x2b9AEXwpcnRKsMUN+7RffYf5Bwmup5cELUCm X-Received: by 10.70.103.10 with SMTP id fs10mr4141040pdb.141.1430980945025; Wed, 06 May 2015 23:42:25 -0700 (PDT) Received: from icarus.au.ibm.com (220-244-113-206.static.tpgi.com.au. [220.244.113.206]) by mx.google.com with ESMTPSA id qm2sm994792pdb.57.2015.05.06.23.42.22 for <skiboot@lists.ozlabs.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 May 2015 23:42:23 -0700 (PDT) From: Joel Stanley <joel@jms.id.au> To: skiboot@lists.ozlabs.org Date: Thu, 7 May 2015 16:11:25 +0930 Message-Id: <1430980885-639-4-git-send-email-joel@jms.id.au> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1430980885-639-1-git-send-email-joel@jms.id.au> References: <1430980885-639-1-git-send-email-joel@jms.id.au> Subject: [Skiboot] [PATCH 3/3] astbmc: Fix uninitialised variable warning X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Mailing list for skiboot development <skiboot.lists.ozlabs.org> List-Unsubscribe: <https://lists.ozlabs.org/options/skiboot>, <mailto:skiboot-request@lists.ozlabs.org?subject=unsubscribe> List-Archive: <http://lists.ozlabs.org/pipermail/skiboot/> List-Post: <mailto:skiboot@lists.ozlabs.org> List-Help: <mailto:skiboot-request@lists.ozlabs.org?subject=help> List-Subscribe: <https://lists.ozlabs.org/listinfo/skiboot>, <mailto:skiboot-request@lists.ozlabs.org?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" <skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> |
diff --git a/platforms/astbmc/pnor.c b/platforms/astbmc/pnor.c index 8e88edd..d294c1f 100644 --- a/platforms/astbmc/pnor.c +++ b/platforms/astbmc/pnor.c @@ -27,7 +27,7 @@ int pnor_init(void) { struct spi_flash_ctrl *pnor_ctrl; - struct flash_chip *pnor_chip; + struct flash_chip *pnor_chip = NULL; int rc; /* Open controller and flash. If the LPC->AHB doesn't point to
platforms/astbmc/pnor.c:43:6: error: variable 'pnor_chip' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (rc) { ^~ platforms/astbmc/pnor.c:58:6: note: uninitialized use occurs here if (pnor_chip) ^~~~~~~~~ platforms/astbmc/pnor.c:43:2: note: remove the 'if' if its condition is always false if (rc) { ^~~~~~~~~ platforms/astbmc/pnor.c:30:30: note: initialize the variable 'pnor_chip' to silence this warning struct flash_chip *pnor_chip; ^ = NULL Signed-off-by: Joel Stanley <joel@jms.id.au> --- platforms/astbmc/pnor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)