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

Commit 59df87c3 authored by Fabio Estevam's avatar Fabio Estevam Committed by Herbert Xu
Browse files

crypto: mxc-scc - check clk_prepare_enable() error



clk_prepare_enable() may fail, so we should better check its return
value and propagate it in the case of failure.

Signed-off-by: default avatarFabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 161040fc
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -668,7 +668,9 @@ static int mxc_scc_probe(struct platform_device *pdev)
		return PTR_ERR(scc->clk);
	}

	clk_prepare_enable(scc->clk);
	ret = clk_prepare_enable(scc->clk);
	if (ret)
		return ret;

	/* clear error status register */
	writel(0x0, scc->base + SCC_SCM_ERROR_STATUS);