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

Commit 761d031e authored by Arvind Yadav's avatar Arvind Yadav Committed by Greg Kroah-Hartman
Browse files

memory: ti-aemif: Handle return value of clk_prepare_enable



clk_prepare_enable() can fail here and we must check its return value.

Signed-off-by: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 76b069b1
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -357,7 +357,10 @@ static int aemif_probe(struct platform_device *pdev)
		return PTR_ERR(aemif->clk);
	}

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

	aemif->clk_rate = clk_get_rate(aemif->clk) / MSEC_PER_SEC;

	if (of_device_is_compatible(np, "ti,da850-aemif"))