* [PATCH] cpufreq: OMAP: Check IS_ERR() instead of NULL for omap_device_get_by_hwmod_name
@ 2012-09-18 1:45 Axel Lin
2012-09-18 18:52 ` Rafael J. Wysocki
0 siblings, 1 reply; 4+ messages in thread
From: Axel Lin @ 2012-09-18 1:45 UTC (permalink / raw)
To: linux-kernel
Cc: Kevin Hilman, Rafael J. Wysocki, linux-omap, cpufreq, linux-pm
omap_device_get_by_hwmod_name() returns ERR_PTR on error.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/cpufreq/omap-cpufreq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c
index 6e22f44..65f8e9a 100644
--- a/drivers/cpufreq/omap-cpufreq.c
+++ b/drivers/cpufreq/omap-cpufreq.c
@@ -266,9 +266,9 @@ static int __init omap_cpufreq_init(void)
}
mpu_dev = omap_device_get_by_hwmod_name("mpu");
- if (!mpu_dev) {
+ if (IS_ERR(mpu_dev)) {
pr_warning("%s: unable to get the mpu device\n", __func__);
- return -EINVAL;
+ return PTR_ERR(mpu_dev);
}
mpu_reg = regulator_get(mpu_dev, "vcc");
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] cpufreq: OMAP: Check IS_ERR() instead of NULL for omap_device_get_by_hwmod_name
2012-09-18 1:45 [PATCH] cpufreq: OMAP: Check IS_ERR() instead of NULL for omap_device_get_by_hwmod_name Axel Lin
@ 2012-09-18 18:52 ` Rafael J. Wysocki
2012-09-19 16:51 ` Kevin Hilman
0 siblings, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2012-09-18 18:52 UTC (permalink / raw)
To: Axel Lin, Kevin Hilman; +Cc: linux-kernel, linux-omap, cpufreq, linux-pm
On Tuesday, September 18, 2012, Axel Lin wrote:
> omap_device_get_by_hwmod_name() returns ERR_PTR on error.
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
Kevin, should I take this?
Rafael
> ---
> drivers/cpufreq/omap-cpufreq.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c
> index 6e22f44..65f8e9a 100644
> --- a/drivers/cpufreq/omap-cpufreq.c
> +++ b/drivers/cpufreq/omap-cpufreq.c
> @@ -266,9 +266,9 @@ static int __init omap_cpufreq_init(void)
> }
>
> mpu_dev = omap_device_get_by_hwmod_name("mpu");
> - if (!mpu_dev) {
> + if (IS_ERR(mpu_dev)) {
> pr_warning("%s: unable to get the mpu device\n", __func__);
> - return -EINVAL;
> + return PTR_ERR(mpu_dev);
> }
>
> mpu_reg = regulator_get(mpu_dev, "vcc");
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cpufreq: OMAP: Check IS_ERR() instead of NULL for omap_device_get_by_hwmod_name
2012-09-18 18:52 ` Rafael J. Wysocki
@ 2012-09-19 16:51 ` Kevin Hilman
2012-09-19 20:17 ` Rafael J. Wysocki
0 siblings, 1 reply; 4+ messages in thread
From: Kevin Hilman @ 2012-09-19 16:51 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Axel Lin, linux-kernel, linux-omap, cpufreq, linux-pm
"Rafael J. Wysocki" <rjw@sisk.pl> writes:
> On Tuesday, September 18, 2012, Axel Lin wrote:
>> omap_device_get_by_hwmod_name() returns ERR_PTR on error.
>>
>> Signed-off-by: Axel Lin <axel.lin@gmail.com>
>
> Kevin, should I take this?
Yes, please.
Acked-by: Kevin Hilman <khilman@ti.com>
Thanks,
Kevin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cpufreq: OMAP: Check IS_ERR() instead of NULL for omap_device_get_by_hwmod_name
2012-09-19 16:51 ` Kevin Hilman
@ 2012-09-19 20:17 ` Rafael J. Wysocki
0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2012-09-19 20:17 UTC (permalink / raw)
To: Kevin Hilman; +Cc: Axel Lin, linux-kernel, linux-omap, cpufreq, linux-pm
On Wednesday, September 19, 2012, Kevin Hilman wrote:
> "Rafael J. Wysocki" <rjw@sisk.pl> writes:
>
> > On Tuesday, September 18, 2012, Axel Lin wrote:
> >> omap_device_get_by_hwmod_name() returns ERR_PTR on error.
> >>
> >> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> >
> > Kevin, should I take this?
>
> Yes, please.
>
> Acked-by: Kevin Hilman <khilman@ti.com>
Done.
Thanks,
Rafael
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-09-19 20:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-18 1:45 [PATCH] cpufreq: OMAP: Check IS_ERR() instead of NULL for omap_device_get_by_hwmod_name Axel Lin
2012-09-18 18:52 ` Rafael J. Wysocki
2012-09-19 16:51 ` Kevin Hilman
2012-09-19 20:17 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox