diff options
author | Paul Mundt <lethal@linux-sh.org> | 2011-06-24 10:36:23 +0200 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-06-24 10:36:23 +0200 |
commit | 7912825d8b755e6a5b9839eab910f451b0271aba (patch) | |
tree | 2f74cef36372a9a9c1462b62f6f8ab648ad24d8a /arch/sh/boards/board-apsh4ad0a.c | |
parent | sh: clkfwk: Convert to IS_ERR_OR_NULL. (diff) | |
download | linux-7912825d8b755e6a5b9839eab910f451b0271aba.tar.xz linux-7912825d8b755e6a5b9839eab910f451b0271aba.zip |
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/board-apsh4ad0a.c')
-rw-r--r-- | arch/sh/boards/board-apsh4ad0a.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sh/boards/board-apsh4ad0a.c b/arch/sh/boards/board-apsh4ad0a.c index e2bd218a054e..b4d6292a9247 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) int ret; clk = clk_get(NULL, "extal"); - if (!clk || IS_ERR(clk)) + if (IS_ERR(clk)) return PTR_ERR(clk); ret = clk_set_rate(clk, 33333000); clk_put(clk); |