* [PATCH] sh: fix clk_get() error handling
@ 2010-10-15 14:37 Guennadi Liakhovetski
2010-10-18 11:34 ` Paul Mundt
0 siblings, 1 reply; 2+ messages in thread
From: Guennadi Liakhovetski @ 2010-10-15 14:37 UTC (permalink / raw)
To: linux-sh
clk_get() returns an ERR_PTR(errno) on error and not NULL.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
arch/sh/boards/mach-ecovec24/setup.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
index feadf5d..0161deb 100644
--- a/arch/sh/boards/mach-ecovec24/setup.c
+++ b/arch/sh/boards/mach-ecovec24/setup.c
@@ -1260,14 +1260,14 @@ static int __init arch_setup(void)
/* set SPU2 clock to 83.4 MHz */
clk = clk_get(NULL, "spu_clk");
- if (clk) {
+ if (!IS_ERR(clk)) {
clk_set_rate(clk, clk_round_rate(clk, 83333333));
clk_put(clk);
}
/* change parent of FSI B */
clk = clk_get(NULL, "fsib_clk");
- if (clk) {
+ if (!IS_ERR(clk)) {
clk_register(&fsimckb_clk);
clk_set_parent(clk, &fsimckb_clk);
clk_set_rate(clk, 11000);
@@ -1285,7 +1285,7 @@ static int __init arch_setup(void)
/* set VPU clock to 166 MHz */
clk = clk_get(NULL, "vpu_clk");
- if (clk) {
+ if (!IS_ERR(clk)) {
clk_set_rate(clk, clk_round_rate(clk, 166000000));
clk_put(clk);
}
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] sh: fix clk_get() error handling
2010-10-15 14:37 [PATCH] sh: fix clk_get() error handling Guennadi Liakhovetski
@ 2010-10-18 11:34 ` Paul Mundt
0 siblings, 0 replies; 2+ messages in thread
From: Paul Mundt @ 2010-10-18 11:34 UTC (permalink / raw)
To: linux-sh
On Fri, Oct 15, 2010 at 04:37:24PM +0200, Guennadi Liakhovetski wrote:
> clk_get() returns an ERR_PTR(errno) on error and not NULL.
>
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-18 11:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-15 14:37 [PATCH] sh: fix clk_get() error handling Guennadi Liakhovetski
2010-10-18 11:34 ` Paul Mundt
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).