mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
225ca45c3c
commit
7912825d8b
|
@ -116,7 +116,7 @@ static int apsh4a3a_clk_init(void)
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
clk = clk_get(NULL, "extal");
|
clk = clk_get(NULL, "extal");
|
||||||
if (!clk || IS_ERR(clk))
|
if (IS_ERR(clk))
|
||||||
return PTR_ERR(clk);
|
return PTR_ERR(clk);
|
||||||
ret = clk_set_rate(clk, 33333000);
|
ret = clk_set_rate(clk, 33333000);
|
||||||
clk_put(clk);
|
clk_put(clk);
|
||||||
|
|
|
@ -94,7 +94,7 @@ static int apsh4ad0a_clk_init(void)
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
clk = clk_get(NULL, "extal");
|
clk = clk_get(NULL, "extal");
|
||||||
if (!clk || IS_ERR(clk))
|
if (IS_ERR(clk))
|
||||||
return PTR_ERR(clk);
|
return PTR_ERR(clk);
|
||||||
ret = clk_set_rate(clk, 33333000);
|
ret = clk_set_rate(clk, 33333000);
|
||||||
clk_put(clk);
|
clk_put(clk);
|
||||||
|
|
|
@ -299,7 +299,7 @@ static int sh7785lcr_clk_init(void)
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
clk = clk_get(NULL, "extal");
|
clk = clk_get(NULL, "extal");
|
||||||
if (!clk || IS_ERR(clk))
|
if (IS_ERR(clk))
|
||||||
return PTR_ERR(clk);
|
return PTR_ERR(clk);
|
||||||
ret = clk_set_rate(clk, 33333333);
|
ret = clk_set_rate(clk, 33333333);
|
||||||
clk_put(clk);
|
clk_put(clk);
|
||||||
|
|
|
@ -190,7 +190,7 @@ static int urquell_clk_init(void)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
clk = clk_get(NULL, "extal");
|
clk = clk_get(NULL, "extal");
|
||||||
if (!clk || IS_ERR(clk))
|
if (IS_ERR(clk))
|
||||||
return PTR_ERR(clk);
|
return PTR_ERR(clk);
|
||||||
ret = clk_set_rate(clk, 33333333);
|
ret = clk_set_rate(clk, 33333333);
|
||||||
clk_put(clk);
|
clk_put(clk);
|
||||||
|
|
|
@ -194,7 +194,7 @@ static int sdk7786_clk_init(void)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
clk = clk_get(NULL, "extal");
|
clk = clk_get(NULL, "extal");
|
||||||
if (!clk || IS_ERR(clk))
|
if (IS_ERR(clk))
|
||||||
return PTR_ERR(clk);
|
return PTR_ERR(clk);
|
||||||
ret = clk_set_rate(clk, 33333333);
|
ret = clk_set_rate(clk, 33333333);
|
||||||
clk_put(clk);
|
clk_put(clk);
|
||||||
|
|
Loading…
Reference in New Issue