aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
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
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')
-rw-r--r--arch/sh/boards/board-apsh4a3a.c2
-rw-r--r--arch/sh/boards/board-apsh4ad0a.c2
-rw-r--r--arch/sh/boards/board-sh7785lcr.c2
-rw-r--r--arch/sh/boards/board-urquell.c2
-rw-r--r--arch/sh/boards/mach-sdk7786/setup.c2
5 files changed, 5 insertions, 5 deletions
diff --git a/arch/sh/boards/board-apsh4a3a.c b/arch/sh/boards/board-apsh4a3a.c
index 8e2a27057bc..2823619c600 100644
--- a/arch/sh/boards/board-apsh4a3a.c
+++ b/arch/sh/boards/board-apsh4a3a.c
@@ -116,7 +116,7 @@ static int apsh4a3a_clk_init(void)
116 int ret; 116 int ret;
117 117
118 clk = clk_get(NULL, "extal"); 118 clk = clk_get(NULL, "extal");
119 if (!clk || IS_ERR(clk)) 119 if (IS_ERR(clk))
120 return PTR_ERR(clk); 120 return PTR_ERR(clk);
121 ret = clk_set_rate(clk, 33333000); 121 ret = clk_set_rate(clk, 33333000);
122 clk_put(clk); 122 clk_put(clk);
diff --git a/arch/sh/boards/board-apsh4ad0a.c b/arch/sh/boards/board-apsh4ad0a.c
index e2bd218a054..b4d6292a924 100644
--- a/arch/sh/boards/board-apsh4ad0a.c
+++ b/arch/sh/boards/board-apsh4ad0a.c
@@ -94,7 +94,7 @@ static int apsh4ad0a_clk_init(void)
94 int ret; 94 int ret;
95 95
96 clk = clk_get(NULL, "extal"); 96 clk = clk_get(NULL, "extal");
97 if (!clk || IS_ERR(clk)) 97 if (IS_ERR(clk))
98 return PTR_ERR(clk); 98 return PTR_ERR(clk);
99 ret = clk_set_rate(clk, 33333000); 99 ret = clk_set_rate(clk, 33333000);
100 clk_put(clk); 100 clk_put(clk);
diff --git a/arch/sh/boards/board-sh7785lcr.c b/arch/sh/boards/board-sh7785lcr.c
index ee65ff05c55..d879848f3cd 100644
--- a/arch/sh/boards/board-sh7785lcr.c
+++ b/arch/sh/boards/board-sh7785lcr.c
@@ -299,7 +299,7 @@ static int sh7785lcr_clk_init(void)
299 int ret; 299 int ret;
300 300
301 clk = clk_get(NULL, "extal"); 301 clk = clk_get(NULL, "extal");
302 if (!clk || IS_ERR(clk)) 302 if (IS_ERR(clk))
303 return PTR_ERR(clk); 303 return PTR_ERR(clk);
304 ret = clk_set_rate(clk, 33333333); 304 ret = clk_set_rate(clk, 33333333);
305 clk_put(clk); 305 clk_put(clk);
diff --git a/arch/sh/boards/board-urquell.c b/arch/sh/boards/board-urquell.c
index d81c609decc..24e3316c5c1 100644
--- a/arch/sh/boards/board-urquell.c
+++ b/arch/sh/boards/board-urquell.c
@@ -190,7 +190,7 @@ static int urquell_clk_init(void)
190 return -EINVAL; 190 return -EINVAL;
191 191
192 clk = clk_get(NULL, "extal"); 192 clk = clk_get(NULL, "extal");
193 if (!clk || IS_ERR(clk)) 193 if (IS_ERR(clk))
194 return PTR_ERR(clk); 194 return PTR_ERR(clk);
195 ret = clk_set_rate(clk, 33333333); 195 ret = clk_set_rate(clk, 33333333);
196 clk_put(clk); 196 clk_put(clk);
diff --git a/arch/sh/boards/mach-sdk7786/setup.c b/arch/sh/boards/mach-sdk7786/setup.c
index 1521aa75ee3..486d1ac3694 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);