From: Arvind Yadav Date: Tue, 1 Aug 2017 11:35:09 +0000 (+0530) Subject: mtd: nand: denali: Handle return value of clk_prepare_enable. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c044179ea14db0855edc3d8f82bd998202167368;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Boris Brezillon --- diff --git a/drivers/mtd/nand/denali_dt.c b/drivers/mtd/nand/denali_dt.c index 47f398edf18f..56e2e177644d 100644 --- a/drivers/mtd/nand/denali_dt.c +++ b/drivers/mtd/nand/denali_dt.c @@ -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);