From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752193AbcBKE6S (ORCPT ); Wed, 10 Feb 2016 23:58:18 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:33540 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751942AbcBKE6R (ORCPT ); Wed, 10 Feb 2016 23:58:17 -0500 Message-ID: <1455166693.28473.1.camel@ingics.com> Subject: [PATCH 2/2] regulator: qcom_saw: Fix uninitialized variable build warning From: Axel Lin To: Mark Brown Cc: Georgi Djakov , Liam Girdwood , linux-kernel@vger.kernel.org Date: Thu, 11 Feb 2016 12:58:13 +0800 In-Reply-To: <1455166641.28473.0.camel@ingics.com> References: <1455166641.28473.0.camel@ingics.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix below build warning: CC [M] drivers/regulator/qcom_saw-regulator.o drivers/regulator/qcom_saw-regulator.c: In function 'qcom_saw_regulator_probe': drivers/regulator/qcom_saw-regulator.c:154:5: warning: 'found' is used uninitialized in this function [-Wuninitialized] drivers/regulator/qcom_saw-regulator.c:140:7: note: 'found' was declared here Signed-off-by: Axel Lin --- drivers/regulator/qcom_saw-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/qcom_saw-regulator.c b/drivers/regulator/qcom_saw-regulator.c index c00f0df..6751614 100644 --- a/drivers/regulator/qcom_saw-regulator.c +++ b/drivers/regulator/qcom_saw-regulator.c @@ -137,7 +137,7 @@ static struct saw_vreg *saw_get_drv(struct platform_device *pdev, struct saw_vreg *vreg = NULL; struct device_node *cpu_node, *saw_node; int cpu; - bool found; + bool found = false; for_each_possible_cpu(cpu) { cpu_node = of_cpu_device_node_get(cpu); -- 2.1.4