Skip to content

Commit

Permalink
sh: boards: mach-se: use IS_ERR() instead of NULL check
Browse files Browse the repository at this point in the history
clk_get() returns ERR_PTR() on error, not NULL.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Reviewed-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Vasiliy Kulikov authored and Paul Mundt committed Nov 29, 2010
1 parent 4bd5d25 commit 193006f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/sh/boards/mach-se/7724/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -871,14 +871,14 @@ static int __init devices_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 A */
clk = clk_get(NULL, "fsia_clk");
if (clk) {
if (!IS_ERR(clk)) {
clk_register(&fsimcka_clk);
clk_set_parent(clk, &fsimcka_clk);
clk_set_rate(clk, 11000);
Expand Down

0 comments on commit 193006f

Please sign in to comment.