kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Jacob Pan <jacob.jun.pan@linux.intel.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Len Brown <lenb@kernel.org>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org,
	Kees Cook <keescook@chromium.org>
Subject: [PATCH] intel_idle: Fix uninitialized variable bug
Date: Wed, 24 Jun 2020 13:19:21 +0000	[thread overview]
Message-ID: <20200624131921.GB9972@mwanda> (raw)

The "tick" variable isn't initialized if "lapic_timer_always_reliable"
is true.

Fixes: 40ab82e08d78 ("intel_idle: Simplify LAPIC timer reliability checks")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/idle/intel_idle.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index aae53e650638..6c9152f303a6 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -132,7 +132,7 @@ static __cpuidle int intel_idle(struct cpuidle_device *dev,
 	struct cpuidle_state *state = &drv->states[index];
 	unsigned long eax = flg2MWAIT(state->flags);
 	unsigned long ecx = 1; /* break on interrupt flag */
-	bool tick;
+	bool tick = false;
 	int cpu = smp_processor_id();
 
 	/*
-- 
2.27.0

             reply	other threads:[~2020-06-24 13:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-24 13:19 Dan Carpenter [this message]
2020-06-24 13:41 ` [PATCH] intel_idle: Fix uninitialized variable bug Rafael J. Wysocki
2020-06-25  9:04   ` Dan Carpenter
2020-06-25 10:37     ` Rafael J. Wysocki

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=20200624131921.GB9972@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=jacob.jun.pan@linux.intel.com \
    --cc=keescook@chromium.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    /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).