mtd: nand: denali: 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: Boris Brezillon <boris.brezillon@free-electrons.com>
This commit is contained in:
Родитель
55bafbc277
Коммит
c044179ea1
|
@ -118,7 +118,9 @@ static int denali_dt_probe(struct platform_device *pdev)
|
|||
dev_err(&pdev->dev, "no clk available\n");
|
||||
return PTR_ERR(dt->clk);
|
||||
}
|
||||
clk_prepare_enable(dt->clk);
|
||||
ret = clk_prepare_enable(dt->clk);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
denali->clk_x_rate = clk_get_rate(dt->clk);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче