Skip to content

Commit

Permalink
memory: ti-aemif: Handle return value of clk_prepare_enable
Browse files Browse the repository at this point in the history
clk_prepare_enable() can fail here and we must check its return value.

Signed-off-by: Arvind Yadav <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
ArvindYadavCs authored and gregkh committed Jun 3, 2017
1 parent 76b069b commit 761d031
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/memory/ti-aemif.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down

0 comments on commit 761d031

Please sign in to comment.