linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: naresh.bhat@linaro.org
To: linux-acpi@vger.kernel.org
Cc: len.brown@intel.com, patches@linaro.org,
	linaro-kernel@lists.linaro.org, naresh.bhat@linaro.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] ACPI/fan: Initialize acpi_state variable
Date: Thu, 27 Jun 2013 16:38:34 +0530	[thread overview]
Message-ID: <1372331314-31010-1-git-send-email-naresh.bhat@linaro.org> (raw)

From: Naresh Bhat <naresh.bhat@linaro.org>

  CC      drivers/acpi/fan.o
drivers/acpi/fan.c: In function ‘fan_get_cur_state’:
drivers/acpi/fan.c:96:9: warning: ‘acpi_state’ may be used uninitialized in this function [-Wuninitialized]
---
 drivers/acpi/fan.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c
index f815da8..f61f7fd 100644
--- a/drivers/acpi/fan.c
+++ b/drivers/acpi/fan.c
@@ -84,7 +84,7 @@ static int fan_get_cur_state(struct thermal_cooling_device *cdev, unsigned long
 {
 	struct acpi_device *device = cdev->devdata;
 	int result;
-	int acpi_state;
+	int acpi_state = 0;
 
 	if (!device)
 		return -EINVAL;
-- 
1.7.9.5


             reply	other threads:[~2013-06-27 11:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-27 11:08 naresh.bhat [this message]
2013-06-27 12:28 ` [PATCH] ACPI/fan: Initialize acpi_state variable Rafael J. Wysocki
2013-06-27 13:07   ` Naresh Bhat
2013-06-27 19:29     ` Rafael J. Wysocki
2013-06-27 19:49       ` Naresh Bhat
2013-06-27 19:47 naresh.bhat
2013-07-01 12:01 ` Naresh Bhat
2013-07-01 13:59   ` Rafael J. Wysocki
2013-07-01 14:25     ` Naresh Bhat
2013-07-01 14:21 naresh.bhat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1372331314-31010-1-git-send-email-naresh.bhat@linaro.org \
    --to=naresh.bhat@linaro.org \
    --cc=len.brown@intel.com \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).