Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 56ea5109 authored by Guennadi Liakhovetski's avatar Guennadi Liakhovetski Committed by Paul Mundt
Browse files

sh: fix clk_get() error handling



clk_get() returns an ERR_PTR(errno) on error and not NULL.

Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent e5690e0d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1248,14 +1248,14 @@ static int __init arch_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 B */
	clk = clk_get(NULL, "fsib_clk");
	if (clk) {
	if (!IS_ERR(clk)) {
		clk_register(&fsimckb_clk);
		clk_set_parent(clk, &fsimckb_clk);
		clk_set_rate(clk, 11000);
@@ -1273,7 +1273,7 @@ static int __init arch_setup(void)

	/* set VPU clock to 166 MHz */
	clk = clk_get(NULL, "vpu_clk");
	if (clk) {
	if (!IS_ERR(clk)) {
		clk_set_rate(clk, clk_round_rate(clk, 166000000));
		clk_put(clk);
	}