Skip to content

Commit 761d031

Browse files
ArvindYadavCsgregkh
authored andcommitted
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: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 76b069b commit 761d031

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/memory/ti-aemif.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,10 @@ static int aemif_probe(struct platform_device *pdev)
357357
return PTR_ERR(aemif->clk);
358358
}
359359

360-
clk_prepare_enable(aemif->clk);
360+
ret = clk_prepare_enable(aemif->clk);
361+
if (ret)
362+
return ret;
363+
361364
aemif->clk_rate = clk_get_rate(aemif->clk) / MSEC_PER_SEC;
362365

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

0 commit comments

Comments
 (0)