sh: boards: mach-se: use IS_ERR() instead of NULL check
authorVasiliy Kulikov <segoon@openwall.com>
Fri, 26 Nov 2010 17:06:28 +0000 (17:06 +0000)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 29 Nov 2010 03:59:28 +0000 (12:59 +0900)
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>
arch/sh/boards/mach-se/7724/setup.c

index c31d228fdfc6257d248c28f0fac88ba274dc52b1..673530500e2727b670f3a6995a41c9467a77732b 100644 (file)
@@ -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);