]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
sh: Tidy up pre-clkdev clk_get() error handling.
authorPaul Mundt <lethal@linux-sh.org>
Fri, 24 Jun 2011 08:36:23 +0000 (17:36 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Fri, 24 Jun 2011 08:36:23 +0000 (17:36 +0900)
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>
arch/sh/boards/board-apsh4a3a.c
arch/sh/boards/board-apsh4ad0a.c
arch/sh/boards/board-sh7785lcr.c
arch/sh/boards/board-urquell.c
arch/sh/boards/mach-sdk7786/setup.c

index 8e2a27057bc929dd0e6af00b9ccee249b97d7542..2823619c600672a71f0bf79854fd6c213cf45418 100644 (file)
@@ -116,7 +116,7 @@ static int apsh4a3a_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);
index e2bd218a054e6c63307f4f745d9f500edfa410a8..b4d6292a9247bb40682c470b0cad78b0a72b1f95 100644 (file)
@@ -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);
index ee65ff05c558d401ce844fed329ee2cc24be683f..d879848f3cdd49ac533502064b7025c39cf53ecb 100644 (file)
@@ -299,7 +299,7 @@ static int sh7785lcr_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, 33333333);
        clk_put(clk);
index d81c609decc7af6105360361631ebf3ff943bd75..24e3316c5c179067839ca956da29f685b87246c2 100644 (file)
@@ -190,7 +190,7 @@ static int urquell_clk_init(void)
                return -EINVAL;
 
        clk = clk_get(NULL, "extal");
-       if (!clk || IS_ERR(clk))
+       if (IS_ERR(clk))
                return PTR_ERR(clk);
        ret = clk_set_rate(clk, 33333333);
        clk_put(clk);
index 1521aa75ee3ac0517a2094c27bb448e31ccbbd99..486d1ac3694c2638d810c718b83d0ede65f1cd75 100644 (file)
@@ -194,7 +194,7 @@ static int sdk7786_clk_init(void)
                return -EINVAL;
 
        clk = clk_get(NULL, "extal");
-       if (!clk || IS_ERR(clk))
+       if (IS_ERR(clk))
                return PTR_ERR(clk);
        ret = clk_set_rate(clk, 33333333);
        clk_put(clk);