[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1501587309-20900-2-git-send-email-arvind.yadav.cs@gmail.com>
Date: Tue, 1 Aug 2017 17:05:09 +0530
From: Arvind Yadav <arvind.yadav.cs@...il.com>
To: boris.brezillon@...e-electrons.com, richard@....at,
dwmw2@...radead.org, computersforpeace@...il.com,
marek.vasut@...il.com, cyrille.pitchen@...ev4u.fr,
narmstrong@...libre.com
Cc: linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH 1/6] 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@...il.com>
---
drivers/mtd/nand/denali_dt.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/denali_dt.c b/drivers/mtd/nand/denali_dt.c
index 47f398e..56e2e17 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);
--
1.9.1
Powered by blists - more mailing lists