diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2010-10-15 10:37:24 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-10-18 07:33:10 -0400 |
commit | 56ea510962ec690ede2be2064de72e51a33011d9 (patch) | |
tree | 67f8acf241a7723ab82909368fcdc347c006c3ce /arch/sh/boards/mach-ecovec24 | |
parent | e5690e0dcffe38fa7b4b6336169a0c518d8a688e (diff) |
sh: fix clk_get() error handling
clk_get() returns an ERR_PTR(errno) on error and not NULL.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards/mach-ecovec24')
-rw-r--r-- | 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 1d7b495a7db4..71a3368ab1fc 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c | |||
@@ -1248,14 +1248,14 @@ static int __init arch_setup(void) | |||
1248 | 1248 | ||
1249 | /* set SPU2 clock to 83.4 MHz */ | 1249 | /* set SPU2 clock to 83.4 MHz */ |
1250 | clk = clk_get(NULL, "spu_clk"); | 1250 | clk = clk_get(NULL, "spu_clk"); |
1251 | if (clk) { | 1251 | if (!IS_ERR(clk)) { |
1252 | clk_set_rate(clk, clk_round_rate(clk, 83333333)); | 1252 | clk_set_rate(clk, clk_round_rate(clk, 83333333)); |
1253 | clk_put(clk); | 1253 | clk_put(clk); |
1254 | } | 1254 | } |
1255 | 1255 | ||
1256 | /* change parent of FSI B */ | 1256 | /* change parent of FSI B */ |
1257 | clk = clk_get(NULL, "fsib_clk"); | 1257 | clk = clk_get(NULL, "fsib_clk"); |
1258 | if (clk) { | 1258 | if (!IS_ERR(clk)) { |
1259 | clk_register(&fsimckb_clk); | 1259 | clk_register(&fsimckb_clk); |
1260 | clk_set_parent(clk, &fsimckb_clk); | 1260 | clk_set_parent(clk, &fsimckb_clk); |
1261 | clk_set_rate(clk, 11000); | 1261 | clk_set_rate(clk, 11000); |
@@ -1273,7 +1273,7 @@ static int __init arch_setup(void) | |||
1273 | 1273 | ||
1274 | /* set VPU clock to 166 MHz */ | 1274 | /* set VPU clock to 166 MHz */ |
1275 | clk = clk_get(NULL, "vpu_clk"); | 1275 | clk = clk_get(NULL, "vpu_clk"); |
1276 | if (clk) { | 1276 | if (!IS_ERR(clk)) { |
1277 | clk_set_rate(clk, clk_round_rate(clk, 166000000)); | 1277 | clk_set_rate(clk, clk_round_rate(clk, 166000000)); |
1278 | clk_put(clk); | 1278 | clk_put(clk); |
1279 | } | 1279 | } |