aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/mach-sdk7786
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2011-06-24 04:36:23 -0400
committerPaul Mundt <lethal@linux-sh.org>2011-06-24 04:36:23 -0400
commit7912825d8b755e6a5b9839eab910f451b0271aba (patch)
tree2f74cef36372a9a9c1462b62f6f8ab648ad24d8a /arch/sh/boards/mach-sdk7786
parent225ca45c3c64964163ea1fa85e2081af85956eed (diff)
sh: Tidy up pre-clkdev clk_get() error handling.
clk_get() used to return NULL or an errno value depending on whether a clkdev lookup failed or a clock wasn't found in the primary clock list. As these disjoint paths were unified and everything now is handled via clkdev lookups, the NULL case never makes it out of clk_get(). Update accordingly and always look to the errno value. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards/mach-sdk7786')
-rw-r--r--arch/sh/boards/mach-sdk7786/setup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sh/boards/mach-sdk7786/setup.c b/arch/sh/boards/mach-sdk7786/setup.c
index 1521aa75ee3a..486d1ac3694c 100644
--- a/arch/sh/boards/mach-sdk7786/setup.c
+++ b/arch/sh/boards/mach-sdk7786/setup.c
@@ -194,7 +194,7 @@ static int sdk7786_clk_init(void)
194 return -EINVAL; 194 return -EINVAL;
195 195
196 clk = clk_get(NULL, "extal"); 196 clk = clk_get(NULL, "extal");
197 if (!clk || IS_ERR(clk)) 197 if (IS_ERR(clk))
198 return PTR_ERR(clk); 198 return PTR_ERR(clk);
199 ret = clk_set_rate(clk, 33333333); 199 ret = clk_set_rate(clk, 33333333);
200 clk_put(clk); 200 clk_put(clk);