From: Dan Carpenter <dan.carpenter@oracle.com>
To: Len Brown <len.brown@intel.com>, Kay Sievers <kay.sievers@vrfy.org>
Cc: Kevin Hilman <khilman@ti.com>,
Trinabh Gupta <g.trinabh@gmail.com>,
Arjan van de Ven <arjan@linux.intel.com>,
Deepthi Dharwar <deepthi@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] cpuidle: checking the wrong variable in
Date: Mon, 09 Jan 2012 10:54:54 +0000 [thread overview]
Message-ID: <20120109105454.GA6940@elgon.mountain> (raw)
We updated this in 8a25a2fd12 "cpu: convert 'cpu' and 'machinecheck'
sysdev_class to a regular subsystem" but it should be checking "cpu_dev"
here not "dev". The "dev" variable was dereferenced already.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index 59f4261..7771810 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -294,7 +294,7 @@ static int __cpuidle_register_device(struct cpuidle_device *dev)
struct device *cpu_dev = get_cpu_device((unsigned long)dev->cpu);
struct cpuidle_driver *cpuidle_driver = cpuidle_get_driver();
- if (!dev)
+ if (!cpu_dev)
return -EINVAL;
if (!try_module_get(cpuidle_driver->owner))
return -EINVAL;
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Len Brown <len.brown@intel.com>, Kay Sievers <kay.sievers@vrfy.org>
Cc: Kevin Hilman <khilman@ti.com>,
Trinabh Gupta <g.trinabh@gmail.com>,
Arjan van de Ven <arjan@linux.intel.com>,
Deepthi Dharwar <deepthi@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] cpuidle: checking the wrong variable in __cpuidle_register_device()
Date: Mon, 9 Jan 2012 13:54:54 +0300 [thread overview]
Message-ID: <20120109105454.GA6940@elgon.mountain> (raw)
We updated this in 8a25a2fd12 "cpu: convert 'cpu' and 'machinecheck'
sysdev_class to a regular subsystem" but it should be checking "cpu_dev"
here not "dev". The "dev" variable was dereferenced already.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index 59f4261..7771810 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -294,7 +294,7 @@ static int __cpuidle_register_device(struct cpuidle_device *dev)
struct device *cpu_dev = get_cpu_device((unsigned long)dev->cpu);
struct cpuidle_driver *cpuidle_driver = cpuidle_get_driver();
- if (!dev)
+ if (!cpu_dev)
return -EINVAL;
if (!try_module_get(cpuidle_driver->owner))
return -EINVAL;
next reply other threads:[~2012-01-09 10:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-09 10:54 Dan Carpenter [this message]
2012-01-09 10:54 ` [patch] cpuidle: checking the wrong variable in __cpuidle_register_device() Dan Carpenter
2012-01-09 13:00 ` Srivatsa S. Bhat
2012-01-09 13:12 ` Srivatsa S. 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=20120109105454.GA6940@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=arjan@linux.intel.com \
--cc=deepthi@linux.vnet.ibm.com \
--cc=g.trinabh@gmail.com \
--cc=kay.sievers@vrfy.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=khilman@ti.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.